Skip to content

Commit

Permalink
* Fixed tag decorator empty query, as it will work anyway without set…
Browse files Browse the repository at this point in the history
…ting it to `*`
  • Loading branch information
pmaselkowski committed Sep 5, 2017
1 parent 8526b6e commit 2c202d5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Decorators/QueryBuilder/TagDecorator.php
Expand Up @@ -8,10 +8,8 @@

namespace Maslosoft\Manganel\Decorators\QueryBuilder;

use Maslosoft\Gazebo\PluginFactory;
use Maslosoft\Manganel\Interfaces\ManganelAwareInterface;
use Maslosoft\Manganel\Interfaces\QueryBuilder\ConditionDecoratorInterface;
use Maslosoft\Manganel\Interfaces\QueryBuilder\OperatorDecoratorInterface;
use Maslosoft\Manganel\SearchCriteria;
use Maslosoft\Manganel\Traits\ManganelAwareTrait;

Expand Down Expand Up @@ -50,11 +48,6 @@ public function decorate(&$conditions, SearchCriteria $criteria)
$criteria->addCond($this->field, '==', trim($match, '[]'));
}

// Search all documents if only tag is searched
if(!empty($query))
{
$query = '*';
}
$criteria->search($query);
}

Expand Down

0 comments on commit 2c202d5

Please sign in to comment.