mirror of
https://github.com/flarum/framework.git
synced 2025-04-14 07:03:04 +08:00
Fix compatibility with tags extension
This commit is contained in:
parent
0892a979be
commit
835c3eef71
@ -1,7 +1,7 @@
|
||||
<?php namespace Flarum\Sticky\Handlers;
|
||||
|
||||
use Flarum\Core\Events\DiscussionSearchWillBePerformed;
|
||||
use Flarum\Categories\CategoryGambit;
|
||||
use Flarum\Tags\TagGambit;
|
||||
|
||||
class StickySearchModifier
|
||||
{
|
||||
@ -20,7 +20,7 @@ class StickySearchModifier
|
||||
}
|
||||
|
||||
foreach ($event->searcher->getActiveGambits() as $gambit) {
|
||||
if ($gambit instanceof CategoryGambit) {
|
||||
if ($gambit instanceof TagGambit) {
|
||||
array_unshift($query->orders, ['column' => 'is_sticky', 'direction' => 'desc']);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user