diff --git a/common/models/Gallery.php b/common/models/Gallery.php index d960451..98b8f58 100755 --- a/common/models/Gallery.php +++ b/common/models/Gallery.php @@ -9,6 +9,8 @@ namespace common\models; use artbox\core\models\Image; + use artbox\core\models\Language; + use yii\db\ActiveQuery; /** * Stub class Gallery @@ -29,7 +31,17 @@ 'gallery' => true, ] ) - ->with('lang') + ->with( + [ + 'lang' => function (ActiveQuery $query) { + $query->andWhere( + [ + 'language_id' => Language::getCurrent()->id, + ] + ); + }, + ] + ) ->all(); } -- libgit2 0.21.4