@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * |
73 | 73 | * @param $module |
74 | 74 | * |
75 | - * @return bool True if module related to SamsonCMS |
|
75 | + * @return integer True if module related to SamsonCMS |
|
76 | 76 | */ |
77 | 77 | public function ifModuleRelated($module) |
78 | 78 | { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * |
109 | 109 | * @param array $params Initialization parameters |
110 | 110 | * |
111 | - * @return bool Initialization stage result |
|
111 | + * @return boolean|null Initialization stage result |
|
112 | 112 | */ |
113 | 113 | public function init(array $params = array()) |
114 | 114 | { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | Event::subscribe('samsonphp.router.create.module.routes', array($this, 'updateCMSPrefix')); |
127 | 127 | Event::subscribe(Compressor::E_CREATE_MODULE_LIST, array($this, 'getModuleList')); |
128 | 128 | //url()->parse(); |
129 | - $this->template = $this->path() . 'app/view/index.php'; |
|
129 | + $this->template = $this->path().'app/view/index.php'; |
|
130 | 130 | // Generate resources for new module |
131 | 131 | //[PHPCOMPRESSOR(remove,start)] |
132 | 132 | //$this->system->module('resourcer')->generateResources($this->cmsModuleList, $this->path() . 'app/view/index.php'); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | public function activeModuleHandler($module) |
140 | 140 | { |
141 | 141 | // Define if routed module is related to SamsonCMS |
142 | - if($this->isCMS = $this->ifModuleRelated($module)){ |
|
142 | + if ($this->isCMS = $this->ifModuleRelated($module)) { |
|
143 | 143 | // TODO: This should be removed - Reparse url |
144 | 144 | url()->parse(); |
145 | 145 | // Switch template to SamsonCMS |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public function updateCMSPrefix($module, &$prefix) |
157 | 157 | { |
158 | 158 | if (($module->id != $this->id) && $this->ifModuleRelated($module)) { |
159 | - $prefix = '/' . $this->baseUrl . $prefix; |
|
159 | + $prefix = '/'.$this->baseUrl.$prefix; |
|
160 | 160 | } |
161 | 161 | } |
162 | 162 | public function buildUrl(&$urlObj, &$httpHost, &$urlParams) |
@@ -245,7 +245,6 @@ discard block |
||
245 | 245 | { |
246 | 246 | $local = m('local'); |
247 | 247 | $current = m(); |
248 | - return isset($current['title']) ? $current['title'] : |
|
249 | - (isset($local['title']) ? $local['title'] : ''); |
|
248 | + return isset($current['title']) ? $current['title'] : (isset($local['title']) ? $local['title'] : ''); |
|
250 | 249 | } |
251 | 250 | } |
252 | 251 | \ No newline at end of file |