From fffd2fb8a8ac668d5adfc8a6c0ebc400c5fba2dd Mon Sep 17 00:00:00 2001 From: Yarik Date: Fri, 15 Apr 2016 10:33:37 +0300 Subject: [PATCH] test --- common/models/GallerySearch.php | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/common/models/GallerySearch.php b/common/models/GallerySearch.php index 58b4284..b3ed632 100644 --- a/common/models/GallerySearch.php +++ b/common/models/GallerySearch.php @@ -83,6 +83,10 @@ 'query' => $query, ]); + $portfolioGallery = PortfolioGallery::find()->select(['gallery_id'])->where(['user_id' => \Yii::$app->user->id])->asArray()->column(); + + $query->andWhere(['not in', 'gallery_id', $portfolioGallery]); + $this->load($params); if(!$this->validate()) { -- libgit2 0.21.4