@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | return $this->isCMS; |
22 | 22 | } |
23 | 23 | |
24 | - public function init( array $params = array() ) { |
|
24 | + public function init(array $params = array()) { |
|
25 | 25 | Event::subscribe('core.security', array($this, 'updateTemplate')); |
26 | 26 | // Old applications main page rendering |
27 | 27 | Event::subscribe('template.main.rendered', array($this, 'oldMainRenderer')); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | Event::subscribe('samson.url.build', array($this, 'buildUrl')); |
32 | 32 | // Call parent initialization |
33 | - return parent::init( $params ); |
|
33 | + return parent::init($params); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function buildUrl(& $urlObj, & $httpHost, & $urlParams) |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if (isset($urlParams[$index]) && (\samson\core\SamsonLocale::current() == $urlParams[$index])) { |
40 | 40 | $index = 1; |
41 | 41 | } |
42 | - if ( isset( $urlParams[$index] ) && ( strpos($urlParams[$index], 'cms-') === 0 ) ) { |
|
42 | + if (isset($urlParams[$index]) && (strpos($urlParams[$index], 'cms-') === 0)) { |
|
43 | 43 | $urlParams[$index] = str_replace('cms-', '', $urlParams[$index]); |
44 | 44 | array_unshift($urlParams, 'cms'); |
45 | 45 | } |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | - public function initUrl( & $urlObj, & $urlArgs ) { |
|
55 | - if($urlArgs[0] == 'cms') { |
|
54 | + public function initUrl(& $urlObj, & $urlArgs) { |
|
55 | + if ($urlArgs[0] == 'cms') { |
|
56 | 56 | $this->isCMS = true; |
57 | 57 | if (isset($urlArgs[1])) { |
58 | - if (strpos($urlArgs[1], 'samsoncms_') !== 0){ |
|
58 | + if (strpos($urlArgs[1], 'samsoncms_') !== 0) { |
|
59 | 59 | $urlArgs[1] = 'cms-'.$urlArgs[1]; |
60 | 60 | } |
61 | 61 | unset($urlArgs[0]); |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | if ($moduleId == 'core') return true; |
70 | 70 | if ($this->isCMS) { |
71 | 71 | $approve = false; |
72 | - if (isset(m($moduleId)->composerParameters['composerName'])&& |
|
73 | - isset(m('cms')->composerParameters['required'])&& |
|
74 | - in_array(m($moduleId)->composerParameters['composerName'], m('cms')->composerParameters['required'])){ |
|
72 | + if (isset(m($moduleId)->composerParameters['composerName']) && |
|
73 | + isset(m('cms')->composerParameters['required']) && |
|
74 | + in_array(m($moduleId)->composerParameters['composerName'], m('cms')->composerParameters['required'])) { |
|
75 | 75 | $approve = true; |
76 | 76 | } |
77 | 77 | } |
@@ -133,7 +133,6 @@ discard block |
||
133 | 133 | { |
134 | 134 | $local = m('local'); |
135 | 135 | $current = m(); |
136 | - return isset($current['title']) ? $current['title'] : |
|
137 | - (isset($local['title']) ? $local['title'] : ''); |
|
136 | + return isset($current['title']) ? $current['title'] : (isset($local['title']) ? $local['title'] : ''); |
|
138 | 137 | } |
139 | 138 | } |