@@ -170,7 +170,7 @@ |
||
| 170 | 170 | if (\samsoncms\Application::find(url()->module, $app/*@var $app App*/)) { |
| 171 | 171 | // If module has sub_menu view - render it |
| 172 | 172 | if ($app->findView('sub_menu')) { |
| 173 | - // Get url params |
|
| 173 | + // Get url params |
|
| 174 | 174 | $url = $_SERVER['REQUEST_URI']; |
| 175 | 175 | // Explode url by symbols '/' |
| 176 | 176 | $url = explode('/', $url); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | Event::subscribe('samsonphp.router.create.module.routes', array($this, 'updateCMSPrefix')); |
| 39 | 39 | |
| 40 | 40 | //[PHPCOMPRESSOR(remove,start)] |
| 41 | - $moduleList = $this->system->module_stack; |
|
| 41 | + $moduleList = $this->system->module_stack; |
|
| 42 | 42 | foreach ($this->system->module_stack as $id => $module) { |
| 43 | 43 | if (!$this->isModuleDependent($module) && $id != 'core' && !$this->ifModuleRelated($module)) { |
| 44 | 44 | unset($moduleList[$id]); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // Generate resources for new module |
| 49 | - $this->system->module('resourcer')->generateResources($moduleList, $this->path() . 'app/view/index.php'); |
|
| 49 | + $this->system->module('resourcer')->generateResources($moduleList, $this->path().'app/view/index.php'); |
|
| 50 | 50 | //[PHPCOMPRESSOR(remove,end)] |
| 51 | 51 | |
| 52 | 52 | // Call parent initialization |
@@ -72,12 +72,12 @@ discard block |
||
| 72 | 72 | public function activeModuleHandler($module) |
| 73 | 73 | { |
| 74 | 74 | // Define if routed module is related to SamsonCMS |
| 75 | - if($this->isCMS = $this->ifModuleRelated($module)){ |
|
| 75 | + if ($this->isCMS = $this->ifModuleRelated($module)) { |
|
| 76 | 76 | // TODO: This should be removed - Reparse url |
| 77 | 77 | url()->parse(); |
| 78 | 78 | |
| 79 | 79 | // Switch template to SamsonCMS |
| 80 | - $this->system->template($this->path() . 'app/view/index.php', true); |
|
| 80 | + $this->system->template($this->path().'app/view/index.php', true); |
|
| 81 | 81 | |
| 82 | 82 | Event::fire(self::EVENT_IS_CMS, array(&$this)); |
| 83 | 83 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | public function updateCMSPrefix($module, &$prefix) |
| 93 | 93 | { |
| 94 | 94 | if (($module->id != $this->id) && $this->ifModuleRelated($module)) { |
| 95 | - $prefix = '/' . $this->baseUrl . $prefix; |
|
| 95 | + $prefix = '/'.$this->baseUrl.$prefix; |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | // If module has sub_menu view - render it |
| 172 | 172 | if ($app->findView('sub_menu')) { |
| 173 | 173 | // Get url params |
| 174 | - $url = $_SERVER['REQUEST_URI']; |
|
| 174 | + $url = $_SERVER['REQUEST_URI']; |
|
| 175 | 175 | // Explode url by symbols '/' |
| 176 | 176 | $url = explode('/', $url); |
| 177 | 177 | // Default value for search field |
@@ -196,7 +196,6 @@ discard block |
||
| 196 | 196 | $local = m('local'); |
| 197 | 197 | $current = m(); |
| 198 | 198 | |
| 199 | - return isset($current['title']) ? $current['title'] : |
|
| 200 | - (isset($local['title']) ? $local['title'] : ''); |
|
| 199 | + return isset($current['title']) ? $current['title'] : (isset($local['title']) ? $local['title'] : ''); |
|
| 201 | 200 | } |
| 202 | 201 | } |