diff --git a/frontend/models/SearchModel.php b/frontend/models/SearchModel.php index 4c7c4da..7d54aa7 100644 --- a/frontend/models/SearchModel.php +++ b/frontend/models/SearchModel.php @@ -8,6 +8,7 @@ namespace frontend\models; + use common\models\Book; use yii\base\Model; use yii\db\Expression; use yii\db\Query; @@ -49,6 +50,6 @@ if ($this->bookTitle){ $query->orWhere(['ilike', 'secondname', $this->text])->orWhere(['ilike', new Expression('concat(name,\' \',secondname)'), $this->text]); } - return $query->column(); + return $query->andWhere(['book.stattus' => Book::STATUS_ACTIVE])->column(); } } \ No newline at end of file -- libgit2 0.21.4