mirror of
https://github.com/humhub/humhub.git
synced 2025-01-29 12:28:06 +01:00
Fixed acitvity stream performance (#5018)
* Fixed acitvity stream performance * Modified CHANGELOG.md
This commit is contained in:
parent
42ff9f8df4
commit
f5679dc944
@ -13,6 +13,7 @@ HumHub Changelog
|
|||||||
- Fix #4985: Fix Activity Mail QueryParams on console mode
|
- Fix #4985: Fix Activity Mail QueryParams on console mode
|
||||||
- Fix #4989: Translate profile field title in admin list
|
- Fix #4989: Translate profile field title in admin list
|
||||||
- Fix #5002: Fix loading of fixture spaces on tests
|
- Fix #5002: Fix loading of fixture spaces on tests
|
||||||
|
- Fix #5018: Activity stream problems with many user accounts
|
||||||
|
|
||||||
|
|
||||||
1.8.1 (March 12, 2021)
|
1.8.1 (March 12, 2021)
|
||||||
|
@ -48,10 +48,11 @@ class ActivityStreamQuery extends ContentContainerStreamQuery
|
|||||||
*/
|
*/
|
||||||
public function afterApplyFilters()
|
public function afterApplyFilters()
|
||||||
{
|
{
|
||||||
if($this->activity) {
|
if ($this->activity) {
|
||||||
$this->channel(self::CHANNEL_ACTIVITY);
|
$this->channel = self::CHANNEL_ACTIVITY;
|
||||||
|
|
||||||
$this->query()->andWhere(['!=', 'user.status', User::STATUS_NEED_APPROVAL]);
|
// Note: With the extra null check, the query performs much faster than directly against the status field.
|
||||||
|
$this->query()->andWhere(['OR', 'user.id IS NULL', ['!=', 'user.status', User::STATUS_NEED_APPROVAL]]);
|
||||||
|
|
||||||
// Exclude own activities
|
// Exclude own activities
|
||||||
if ($this->user) {
|
if ($this->user) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user