From f213698fb5a9e7d7b5b5a01fb5443f2f569b5c78 Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Tue, 17 Jul 2018 13:04:40 +0200 Subject: [PATCH] Fix: Space homepage doesn't allow custom pages on first position --- protected/humhub/docs/CHANGELOG.md | 2 ++ .../space/modules/manage/controllers/DefaultController.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index c917d5f0fe..541e9866c6 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -34,6 +34,8 @@ HumHub Change Log - Enh: Added Twig template engine for usage in modules - Enh: Added id data attribute on contentcontainer links - Fix: Wrong permission check on force invite check +- Fix: Space homepage doesn't allow custom pages on first position + 1.3.0-beta.1 (July 4, 2018) ---------------------------- diff --git a/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php b/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php index 3a9ebf304d..6fd2680140 100644 --- a/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php +++ b/protected/humhub/modules/space/modules/manage/controllers/DefaultController.php @@ -18,6 +18,7 @@ use humhub\modules\space\modules\manage\components\Controller; use humhub\modules\space\modules\manage\models\DeleteForm; use humhub\modules\space\activities\SpaceArchieved; use humhub\modules\space\activities\SpaceUnArchieved; +use yii\helpers\Url; /** * Default space admin action @@ -70,9 +71,9 @@ class DefaultController extends Controller } $indexModuleSelection = Menu::getAvailablePages(); + unset($indexModuleSelection[Url::to(['/space/home', 'container' => $space])]); // To avoid infinit redirects of actionIndex we remove the stream value and set an empty selection instead - array_shift($indexModuleSelection); $indexModuleSelection = ['' => Yii::t('SpaceModule.controllers_AdminController', 'Stream (Default)')] + $indexModuleSelection; return $this->render('advanced', ['model' => $space, 'indexModuleSelection' => $indexModuleSelection]);