Fixed Spacechooser message counter.

This commit is contained in:
buddh4 2017-02-05 14:58:18 +01:00
parent 58332fc438
commit b173035610

View File

@ -133,11 +133,10 @@ class Membership extends \yii\db\ActiveRecord
public function countNewItems($since = "")
{
$query = \humhub\modules\content\models\Content::find();
$query->where(['!=', 'object_model', \humhub\modules\activity\widgets\Activity::className()]);
$query->where(['!=', 'object_model', \humhub\modules\activity\models\Activity::class]);
$query->andWhere(['contentcontainer_id' => $this->space->contentContainerRecord->id]);
$query->andWhere(['>', 'created_at', $this->last_visit]);
$count = $query->count();
return $count;
return $query->count();
}
/**