@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace luya\web; |
4 | 4 | |
5 | 5 | use Yii; |
6 | - |
|
7 | 6 | use yii\web\BadRequestHttpException; |
8 | 7 | use yii\web\NotFoundHttpException; |
9 | 8 |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use luya\theme\ThemeConfig; |
8 | 8 | use Yii; |
9 | 9 | use yii\helpers\Console; |
10 | -use yii\helpers\Inflector; |
|
11 | 10 | |
12 | 11 | /** |
13 | 12 | * Command to create a new LUYA theme. |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace luya\web; |
4 | 4 | |
5 | -use Yii; |
|
6 | -use yii\base\InvalidConfigException; |
|
7 | 5 | use yii\helpers\ArrayHelper; |
8 | 6 | use luya\base\AdminModuleInterface; |
9 | 7 | use luya\TagParser; |
@@ -74,9 +74,9 @@ |
||
74 | 74 | |
75 | 75 | // Check for a full route path where the module ends with admin like `newsadmin` and this module is loaded in the list of modules. |
76 | 76 | // @see https://github.com/luyadev/luya/pull/2027 |
77 | - if (count($parts) > 0 && StringHelper::endsWith($first, 'admin') && Yii::$app->hasModule($first)) |
|
78 | - $this->_isAdmin = true; |
|
79 | - elseif (strtolower(trim($first)) == 'admin') { |
|
77 | + if (count($parts) > 0 && StringHelper::endsWith($first, 'admin') && Yii::$app->hasModule($first)) { |
|
78 | + $this->_isAdmin = true; |
|
79 | + } elseif (strtolower(trim($first)) == 'admin') { |
|
80 | 80 | $this->_isAdmin = true; |
81 | 81 | } else { |
82 | 82 | $this->_isAdmin = false; |