From baca44efcc160a39adb00a8fa24889993513f7ff Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Fri, 19 Jan 2024 14:03:21 +0100 Subject: [PATCH] Fix tests for core v1.16+ --- integration/BirthdayCalendarQuery.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration/BirthdayCalendarQuery.php b/integration/BirthdayCalendarQuery.php index 4da80258..68b72787 100644 --- a/integration/BirthdayCalendarQuery.php +++ b/integration/BirthdayCalendarQuery.php @@ -79,7 +79,7 @@ protected function filterDashboard() return; } - if (!Yii::$app->user->isGuest && Yii::$app->getModule('friendship')->isEnabled) { + if (!Yii::$app->user->isGuest && Yii::$app->getModule('friendship')->settings->get('enable')) { $this->_query->innerJoin('user_friendship', 'user.id=user_friendship.friend_user_id AND user_friendship.user_id=:userId', [':userId' => Yii::$app->user->id]); } else { @@ -115,7 +115,7 @@ protected function filterFollowedUsersCondition(&$conditions = []) $friendshipSubQuery = (new Query())->select('user_friendship.friend_user_id')->from('user_friendship')->where(['user_friendship.user_id' => Yii::$app->user->id]); $followerSubQuery = (new Query())->select('user_follow.object_id')->from('user_follow')->where(['user_follow.user_id' => Yii::$app->user->id])->andWhere(['object_model' => User::class]); - if (!Yii::$app->user->isGuest && Yii::$app->getModule('friendship')->isEnabled) { + if (!Yii::$app->user->isGuest && Yii::$app->getModule('friendship')->settings->get('enable')) { $conditions[] = ['in', 'profile.user_id', $friendshipSubQuery]; $conditions[] = ['in', 'profile.user_id', $followerSubQuery]; } else { @@ -145,4 +145,4 @@ public function filterMine() { $this->_query->andWhere(['profile.user_id' => Yii::$app->user->id]); } -} \ No newline at end of file +}