Commit fffd2fb8a8ac668d5adfc8a6c0ebc400c5fba2dd

Authored by Yarik
1 parent 0c0cdc9d

test

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
common/models/GallerySearch.php
... ... @@ -83,6 +83,10 @@
83 83 'query' => $query,
84 84 ]);
85 85  
  86 + $portfolioGallery = PortfolioGallery::find()->select(['gallery_id'])->where(['user_id' => \Yii::$app->user->id])->asArray()->column();
  87 +
  88 + $query->andWhere(['not in', 'gallery_id', $portfolioGallery]);
  89 +
86 90 $this->load($params);
87 91  
88 92 if(!$this->validate()) {
... ...