Skip to content

Commit

Permalink
Flarum 1.8 compatibility. Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkwinkelmann committed Feb 5, 2024
1 parent 1458451 commit 1384611
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Clark Winkelmann
Copyright (c) 2021-2024 Clark Winkelmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 4 additions & 1 deletion src/Controller/ListCollapsedPosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ protected function data(ServerRequestInterface $request, Document $document)

$results = $results->getResults();

$this->loadRelations($results, $include);
// The third parameter is only available since Flarum 1.8
// It's supposed to be optional, but Flarum Mentions and Likes extension will error if it isn't provided
// We can provide the parameter even on Flarum versions lower than 1.8 since PHP will just ignore it
$this->loadRelations($results, $include, $request);

return $results;
}
Expand Down

0 comments on commit 1384611

Please sign in to comment.