mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix Activity Mail QueryParams on console mode (#4986)
This commit is contained in:
parent
26d7e2667a
commit
168ab6483c
@ -9,6 +9,7 @@ HumHub Changelog
|
||||
- Enh #4960: Added “codeception/module-rest” for testing of REST API modules
|
||||
- Enh #4967: Module update broken with expired licence key
|
||||
- Enh #4972: Fix enabling to send notification on remove user from group
|
||||
- Fix #4985: Fix Activity Mail QueryParams on console mode
|
||||
|
||||
|
||||
1.8.1 (March 12, 2021)
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
namespace humhub\modules\stream\actions;
|
||||
|
||||
use humhub\components\Request;
|
||||
use humhub\modules\stream\events\StreamResponseEvent;
|
||||
use humhub\modules\user\models\User;
|
||||
use Yii;
|
||||
@ -189,9 +190,7 @@ abstract class Stream extends Action
|
||||
$this->user = Yii::$app->user->identity;
|
||||
}
|
||||
|
||||
$streamQueryParams = Yii::$app->request->getQueryParam('StreamQuery');
|
||||
|
||||
if (empty($streamQueryParams['contentId'])) {
|
||||
if (!$this->isSingleContentRequest()) {
|
||||
$this->excludes = array_merge($this->excludes, Yii::$app->getModule('stream')->streamExcludes);
|
||||
}
|
||||
|
||||
@ -433,4 +432,22 @@ abstract class Stream extends Action
|
||||
{
|
||||
return $this->streamQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
private function isSingleContentRequest()
|
||||
{
|
||||
if (Yii::$app->request->isConsoleRequest) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(Yii::$app->request instanceof Request)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$streamQueryParams = Yii::$app->request->getQueryParam('StreamQuery');
|
||||
|
||||
return !empty($streamQueryParams['contentId']);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user