mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 06:08:21 +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 #4960: Added “codeception/module-rest” for testing of REST API modules
|
||||||
- Enh #4967: Module update broken with expired licence key
|
- Enh #4967: Module update broken with expired licence key
|
||||||
- Enh #4972: Fix enabling to send notification on remove user from group
|
- 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)
|
1.8.1 (March 12, 2021)
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
namespace humhub\modules\stream\actions;
|
namespace humhub\modules\stream\actions;
|
||||||
|
|
||||||
|
use humhub\components\Request;
|
||||||
use humhub\modules\stream\events\StreamResponseEvent;
|
use humhub\modules\stream\events\StreamResponseEvent;
|
||||||
use humhub\modules\user\models\User;
|
use humhub\modules\user\models\User;
|
||||||
use Yii;
|
use Yii;
|
||||||
@ -189,9 +190,7 @@ abstract class Stream extends Action
|
|||||||
$this->user = Yii::$app->user->identity;
|
$this->user = Yii::$app->user->identity;
|
||||||
}
|
}
|
||||||
|
|
||||||
$streamQueryParams = Yii::$app->request->getQueryParam('StreamQuery');
|
if (!$this->isSingleContentRequest()) {
|
||||||
|
|
||||||
if (empty($streamQueryParams['contentId'])) {
|
|
||||||
$this->excludes = array_merge($this->excludes, Yii::$app->getModule('stream')->streamExcludes);
|
$this->excludes = array_merge($this->excludes, Yii::$app->getModule('stream')->streamExcludes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,4 +432,22 @@ abstract class Stream extends Action
|
|||||||
{
|
{
|
||||||
return $this->streamQuery;
|
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