Fix: Space homepage doesn't allow custom pages on first position

This commit is contained in:
Lucas Bartholemy 2018-07-17 13:04:40 +02:00
parent b9c7817485
commit f213698fb5
2 changed files with 4 additions and 1 deletions

View File

@ -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)
----------------------------

View File

@ -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]);