Skip to content

Commit

Permalink
Merge pull request #445 from humhub/fix/434-tests
Browse files Browse the repository at this point in the history
Fix tests for core v1.16+
  • Loading branch information
luke- authored Jan 19, 2024
2 parents 975e305 + baca44e commit a27efef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integration/BirthdayCalendarQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -145,4 +145,4 @@ public function filterMine()
{
$this->_query->andWhere(['profile.user_id' => Yii::$app->user->id]);
}
}
}

0 comments on commit a27efef

Please sign in to comment.