@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | $countChild++; |
91 | 91 | $id = $value[0]; |
92 | 92 | $ph['id'] = $id; |
93 | - $ph['li_class'] = $this->getItemClass($id) . $value[10]; |
|
93 | + $ph['li_class'] = $this->getItemClass($id).$value[10]; |
|
94 | 94 | $ph['href'] = $value[3]; |
95 | 95 | $ph['alt'] = $value[4]; |
96 | 96 | $ph['target'] = $value[7]; |
97 | 97 | $ph['onclick'] = $value[5]; |
98 | 98 | $ph['a_class'] = $this->getLinkClass($id); |
99 | 99 | $ph['LinkAttr'] = $this->getLinkAttr($id); |
100 | - $ph['itemName'] = $value[2] . $this->getItemName($id); |
|
100 | + $ph['itemName'] = $value[2].$this->getItemName($id); |
|
101 | 101 | |
102 | 102 | $ph['DrawSub'] = ''; |
103 | 103 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | public function getLinkClass($id) |
146 | 146 | { |
147 | 147 | if (isset($this->menu[$id])) { |
148 | - return ' class="' . $this->defaults['parentLinkClass'] . '"'; |
|
148 | + return ' class="'.$this->defaults['parentLinkClass'].'"'; |
|
149 | 149 | } else { |
150 | 150 | return ''; |
151 | 151 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | public function getItemClass($id) |
172 | 172 | { |
173 | 173 | if (isset($this->menu[$id])) { |
174 | - return $this->defaults['parentClass'] . ' '; |
|
174 | + return $this->defaults['parentClass'].' '; |
|
175 | 175 | } else { |
176 | 176 | return ''; |
177 | 177 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | // Set line feed |
75 | 75 | $lf = "\n"; |
76 | - $tempfile_path = $modx->config['base_path'] . 'assets/backup/temp.php'; |
|
76 | + $tempfile_path = $modx->config['base_path'].'assets/backup/temp.php'; |
|
77 | 77 | |
78 | 78 | $result = $modx->db->query('SHOW TABLES'); |
79 | 79 | $tables = $this->result2Array(0, $result); |
@@ -86,15 +86,15 @@ discard block |
||
86 | 86 | |
87 | 87 | // Set header |
88 | 88 | $output = "#{$lf}"; |
89 | - $output .= "# " . addslashes($modx->config['site_name']) . " Database Dump{$lf}"; |
|
89 | + $output .= "# ".addslashes($modx->config['site_name'])." Database Dump{$lf}"; |
|
90 | 90 | $output .= "# MODX Version:{$version['version']}{$lf}"; |
91 | 91 | $output .= "# {$lf}"; |
92 | 92 | $output .= "# Host: {$this->database_server}{$lf}"; |
93 | - $output .= "# Generation Time: " . $modx->toDateFormat(time()) . $lf; |
|
94 | - $output .= "# Server version: " . $modx->db->getVersion() . $lf; |
|
95 | - $output .= "# PHP Version: " . phpversion() . $lf; |
|
93 | + $output .= "# Generation Time: ".$modx->toDateFormat(time()).$lf; |
|
94 | + $output .= "# Server version: ".$modx->db->getVersion().$lf; |
|
95 | + $output .= "# PHP Version: ".phpversion().$lf; |
|
96 | 96 | $output .= "# Database: `{$this->dbname}`{$lf}"; |
97 | - $output .= "# Description: " . trim($_REQUEST['backup_title']) . "{$lf}"; |
|
97 | + $output .= "# Description: ".trim($_REQUEST['backup_title'])."{$lf}"; |
|
98 | 98 | $output .= "#"; |
99 | 99 | file_put_contents($tempfile_path, $output, FILE_APPEND | LOCK_EX); |
100 | 100 | $output = ''; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | } |
114 | 114 | } |
115 | 115 | if ($callBack === 'snapshot') { |
116 | - if (!preg_match('@^' . $modx->db->config['table_prefix'] . '@', $tblval)) { |
|
116 | + if (!preg_match('@^'.$modx->db->config['table_prefix'].'@', $tblval)) { |
|
117 | 117 | continue; |
118 | 118 | } |
119 | 119 | } |
@@ -150,9 +150,9 @@ discard block |
||
150 | 150 | ), '\\n', $value); |
151 | 151 | $value = "'{$value}'"; |
152 | 152 | } |
153 | - $insertdump .= $value . ','; |
|
153 | + $insertdump .= $value.','; |
|
154 | 154 | } |
155 | - $output .= rtrim($insertdump, ',') . ");\n"; |
|
155 | + $output .= rtrim($insertdump, ',').");\n"; |
|
156 | 156 | if (1048576 < strlen($output)) { |
157 | 157 | file_put_contents($tempfile_path, $output, FILE_APPEND | LOCK_EX); |
158 | 158 | $output = ''; |
@@ -43,44 +43,44 @@ discard block |
||
43 | 43 | public $im_height = 0; |
44 | 44 | public $im; |
45 | 45 | |
46 | - public function __construct($w=200, $h=80) { |
|
46 | + public function __construct($w = 200, $h = 80){ |
|
47 | 47 | /* create session to set word for verification */ |
48 | 48 | $this->setVeriword(); |
49 | - $this->dir_font = MODX_BASE_PATH . 'assets/' . $this->dir_font; |
|
49 | + $this->dir_font = MODX_BASE_PATH.'assets/'.$this->dir_font; |
|
50 | 50 | $this->im_width = $w; |
51 | 51 | $this->im_height = $h; |
52 | 52 | } |
53 | 53 | |
54 | - public function setVeriword() { |
|
54 | + public function setVeriword(){ |
|
55 | 55 | /* create session variable for verification, |
56 | 56 | you may change the session variable name */ |
57 | 57 | $this->word = $this->makeText(); |
58 | 58 | $_SESSION['veriword'] = $this->word; |
59 | 59 | } |
60 | 60 | |
61 | - public function output() { |
|
61 | + public function output(){ |
|
62 | 62 | /* output the image as jpeg */ |
63 | 63 | $this->drawImage(); |
64 | 64 | header("Content-type: image/jpeg"); |
65 | 65 | imagejpeg($this->im); |
66 | 66 | } |
67 | 67 | |
68 | - public function makeText() { |
|
68 | + public function makeText(){ |
|
69 | 69 | $modx = evolutionCMS(); |
70 | 70 | // set default words |
71 | - $words="MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote"; |
|
71 | + $words = "MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote"; |
|
72 | 72 | $words = $modx->config['captcha_words'] ? $modx->config['captcha_words'] : $words; |
73 | 73 | $arr_words = array_filter(array_map('trim', explode(',', $words))); |
74 | 74 | |
75 | 75 | /* pick one randomly for text verification */ |
76 | - return (string) $arr_words[array_rand($arr_words)].rand(10,999); |
|
76 | + return (string) $arr_words[array_rand($arr_words)].rand(10, 999); |
|
77 | 77 | } |
78 | 78 | |
79 | - public function drawText() { |
|
79 | + public function drawText(){ |
|
80 | 80 | $dir = dir($this->dir_font); |
81 | 81 | $fontstmp = array(); |
82 | 82 | while (false !== ($file = $dir->read())) { |
83 | - if(substr($file, -4) == '.ttf') { |
|
83 | + if (substr($file, -4) == '.ttf') { |
|
84 | 84 | $fontstmp[] = $this->dir_font.$file; |
85 | 85 | } |
86 | 86 | } |
@@ -88,35 +88,35 @@ discard block |
||
88 | 88 | $text_font = (string) $fontstmp[array_rand($fontstmp)]; |
89 | 89 | |
90 | 90 | /* angle for text inclination */ |
91 | - $text_angle = rand(-9,9); |
|
91 | + $text_angle = rand(-9, 9); |
|
92 | 92 | /* initial text size */ |
93 | 93 | $text_size = 30; |
94 | 94 | /* calculate text width and height */ |
95 | - $box = imagettfbbox ( $text_size, $text_angle, $text_font, $this->word); |
|
96 | - $text_width = $box[2]-$box[0]; //text width |
|
97 | - $text_height= $box[5]-$box[3]; //text height |
|
95 | + $box = imagettfbbox($text_size, $text_angle, $text_font, $this->word); |
|
96 | + $text_width = $box[2] - $box[0]; //text width |
|
97 | + $text_height = $box[5] - $box[3]; //text height |
|
98 | 98 | |
99 | 99 | /* adjust text size */ |
100 | - $text_size = round((20 * $this->im_width)/$text_width); |
|
100 | + $text_size = round((20 * $this->im_width) / $text_width); |
|
101 | 101 | |
102 | 102 | /* recalculate text width and height */ |
103 | - $box = imagettfbbox ( $text_size, $text_angle, $text_font, $this->word); |
|
104 | - $text_width = $box[2]-$box[0]; //text width |
|
105 | - $text_height= $box[5]-$box[3]; //text height |
|
103 | + $box = imagettfbbox($text_size, $text_angle, $text_font, $this->word); |
|
104 | + $text_width = $box[2] - $box[0]; //text width |
|
105 | + $text_height = $box[5] - $box[3]; //text height |
|
106 | 106 | |
107 | 107 | /* calculate center position of text */ |
108 | - $text_x = ($this->im_width - $text_width)/2; |
|
109 | - $text_y = ($this->im_height - $text_height)/2; |
|
108 | + $text_x = ($this->im_width - $text_width) / 2; |
|
109 | + $text_y = ($this->im_height - $text_height) / 2; |
|
110 | 110 | |
111 | 111 | /* create canvas for text drawing */ |
112 | - $im_text = imagecreate ($this->im_width, $this->im_height); |
|
113 | - $bg_color = imagecolorallocate ($im_text, 255, 255, 255); |
|
112 | + $im_text = imagecreate($this->im_width, $this->im_height); |
|
113 | + $bg_color = imagecolorallocate($im_text, 255, 255, 255); |
|
114 | 114 | |
115 | 115 | /* pick color for text */ |
116 | - $text_color = imagecolorallocate ($im_text, 0, 51, 153); |
|
116 | + $text_color = imagecolorallocate($im_text, 0, 51, 153); |
|
117 | 117 | |
118 | 118 | /* draw text into canvas */ |
119 | - imagettftext ( $im_text, |
|
119 | + imagettftext($im_text, |
|
120 | 120 | $text_size, |
121 | 121 | $text_angle, |
122 | 122 | $text_x, |
@@ -131,19 +131,19 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | |
134 | - public function drawImage() { |
|
134 | + public function drawImage(){ |
|
135 | 135 | |
136 | 136 | /* pick one background image randomly from image directory */ |
137 | - $img_file = MODX_BASE_PATH . 'assets/' . $this->dir_noise."noise".rand(1,4).".jpg"; |
|
137 | + $img_file = MODX_BASE_PATH.'assets/'.$this->dir_noise."noise".rand(1, 4).".jpg"; |
|
138 | 138 | |
139 | 139 | /* create "noise" background image from your image stock*/ |
140 | - $noise_img = @imagecreatefromjpeg ($img_file); |
|
140 | + $noise_img = @imagecreatefromjpeg($img_file); |
|
141 | 141 | $noise_width = imagesx($noise_img); |
142 | 142 | $noise_height = imagesy($noise_img); |
143 | 143 | |
144 | 144 | /* resize the background image to fit the size of image output */ |
145 | - $this->im = imagecreatetruecolor($this->im_width,$this->im_height); |
|
146 | - imagecopyresampled ($this->im, |
|
145 | + $this->im = imagecreatetruecolor($this->im_width, $this->im_height); |
|
146 | + imagecopyresampled($this->im, |
|
147 | 147 | $noise_img, |
148 | 148 | 0, 0, 0, 0, |
149 | 149 | $this->im_width, |
@@ -152,17 +152,17 @@ discard block |
||
152 | 152 | $noise_height); |
153 | 153 | |
154 | 154 | /* put text image into background image */ |
155 | - imagecopymerge ( $this->im, |
|
155 | + imagecopymerge($this->im, |
|
156 | 156 | $this->drawText(), |
157 | 157 | 0, 0, 0, 0, |
158 | 158 | $this->im_width, |
159 | 159 | $this->im_height, |
160 | - 70 ); |
|
160 | + 70); |
|
161 | 161 | |
162 | 162 | return $this->im; |
163 | 163 | } |
164 | 164 | |
165 | - public function destroy() { |
|
165 | + public function destroy(){ |
|
166 | 166 | imagedestroy($this->im); |
167 | 167 | } |
168 | 168 | } |
@@ -43,7 +43,8 @@ discard block |
||
43 | 43 | public $im_height = 0; |
44 | 44 | public $im; |
45 | 45 | |
46 | - public function __construct($w=200, $h=80) { |
|
46 | + public function __construct($w=200, $h=80) |
|
47 | + { |
|
47 | 48 | /* create session to set word for verification */ |
48 | 49 | $this->setVeriword(); |
49 | 50 | $this->dir_font = MODX_BASE_PATH . 'assets/' . $this->dir_font; |
@@ -51,21 +52,24 @@ discard block |
||
51 | 52 | $this->im_height = $h; |
52 | 53 | } |
53 | 54 | |
54 | - public function setVeriword() { |
|
55 | + public function setVeriword() |
|
56 | + { |
|
55 | 57 | /* create session variable for verification, |
56 | 58 | you may change the session variable name */ |
57 | 59 | $this->word = $this->makeText(); |
58 | 60 | $_SESSION['veriword'] = $this->word; |
59 | 61 | } |
60 | 62 | |
61 | - public function output() { |
|
63 | + public function output() |
|
64 | + { |
|
62 | 65 | /* output the image as jpeg */ |
63 | 66 | $this->drawImage(); |
64 | 67 | header("Content-type: image/jpeg"); |
65 | 68 | imagejpeg($this->im); |
66 | 69 | } |
67 | 70 | |
68 | - public function makeText() { |
|
71 | + public function makeText() |
|
72 | + { |
|
69 | 73 | $modx = evolutionCMS(); |
70 | 74 | // set default words |
71 | 75 | $words="MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote"; |
@@ -76,7 +80,8 @@ discard block |
||
76 | 80 | return (string) $arr_words[array_rand($arr_words)].rand(10,999); |
77 | 81 | } |
78 | 82 | |
79 | - public function drawText() { |
|
83 | + public function drawText() |
|
84 | + { |
|
80 | 85 | $dir = dir($this->dir_font); |
81 | 86 | $fontstmp = array(); |
82 | 87 | while (false !== ($file = $dir->read())) { |
@@ -131,7 +136,8 @@ discard block |
||
131 | 136 | } |
132 | 137 | |
133 | 138 | |
134 | - public function drawImage() { |
|
139 | + public function drawImage() |
|
140 | + { |
|
135 | 141 | |
136 | 142 | /* pick one background image randomly from image directory */ |
137 | 143 | $img_file = MODX_BASE_PATH . 'assets/' . $this->dir_noise."noise".rand(1,4).".jpg"; |
@@ -162,7 +168,8 @@ discard block |
||
162 | 168 | return $this->im; |
163 | 169 | } |
164 | 170 | |
165 | - public function destroy() { |
|
171 | + public function destroy() |
|
172 | + { |
|
166 | 173 | imagedestroy($this->im); |
167 | 174 | } |
168 | 175 | } |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | // andrazk 20070416 - if installer is running, destroy active sessions |
21 | -if (file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) { |
|
22 | - include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
21 | +if (file_exists(MODX_BASE_PATH.'assets/cache/installProc.inc.php')) { |
|
22 | + include_once(MODX_BASE_PATH.'assets/cache/installProc.inc.php'); |
|
23 | 23 | if (isset($installStartTime)) { |
24 | 24 | if ((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
25 | 25 | unset($installStartTime); |
26 | - @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
|
27 | - unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
26 | + @ chmod(MODX_BASE_PATH.'assets/cache/installProc.inc.php', 0755); |
|
27 | + unlink(MODX_BASE_PATH.'assets/cache/installProc.inc.php'); |
|
28 | 28 | } else { |
29 | 29 | if ($_SERVER['REQUEST_METHOD'] != 'POST') { |
30 | 30 | if (isset($_COOKIE[session_name()])) { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | // setcookie(session_name(), '', 0, MODX_BASE_URL); |
51 | 51 | } |
52 | 52 | header('HTTP/1.0 307 Redirect'); |
53 | - header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2'); |
|
53 | + header('Location: '.MODX_MANAGER_URL.'index.php?installGoingOn=2'); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | // establish fallback to English default |
63 | 63 | include_once "lang/english.inc.php"; |
64 | 64 | // include localized overrides |
65 | - include_once "lang/" . $manager_language . ".inc.php"; |
|
65 | + include_once "lang/".$manager_language.".inc.php"; |
|
66 | 66 | } else { |
67 | 67 | include_once "lang/english.inc.php"; |
68 | 68 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
71 | 71 | $modx->setPlaceholder('theme', $manager_theme); |
72 | 72 | $modx->setPlaceholder('favicon', |
73 | - (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico')); |
|
73 | + (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico')); |
|
74 | 74 | |
75 | 75 | // invoke OnManagerLoginFormPrerender event |
76 | 76 | $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender'); |
@@ -81,25 +81,25 @@ discard block |
||
81 | 81 | $modx->setPlaceholder('manager_path', MGR_DIR); |
82 | 82 | $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
83 | 83 | $modx->setPlaceholder('login_message', $_lang["login_message"]); |
84 | - $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
84 | + $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/'); |
|
85 | 85 | $modx->setPlaceholder('year', date('Y')); |
86 | 86 | |
87 | 87 | // set login logo image |
88 | - if ( !empty($modx->config['login_logo']) ) { |
|
89 | - $modx->setPlaceholder('login_logo', MODX_SITE_URL . $modx->config['login_logo']); |
|
88 | + if (!empty($modx->config['login_logo'])) { |
|
89 | + $modx->setPlaceholder('login_logo', MODX_SITE_URL.$modx->config['login_logo']); |
|
90 | 90 | } else { |
91 | - $modx->setPlaceholder('login_logo', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/images/login/default/login-logo.png'); |
|
91 | + $modx->setPlaceholder('login_logo', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/images/login/default/login-logo.png'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | // set login background image |
95 | - if ( !empty($modx->config['login_bg']) ) { |
|
96 | - $modx->setPlaceholder('login_bg', MODX_SITE_URL . $modx->config['login_bg']); |
|
95 | + if (!empty($modx->config['login_bg'])) { |
|
96 | + $modx->setPlaceholder('login_bg', MODX_SITE_URL.$modx->config['login_bg']); |
|
97 | 97 | } else { |
98 | - $modx->setPlaceholder('login_bg', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/images/login/default/login-background.jpg'); |
|
98 | + $modx->setPlaceholder('login_bg', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/images/login/default/login-background.jpg'); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | // set form position css class |
102 | - $modx->setPlaceholder('login_form_position_class', 'loginbox-' . $modx->config['login_form_position']); |
|
102 | + $modx->setPlaceholder('login_form_position_class', 'loginbox-'.$modx->config['login_form_position']); |
|
103 | 103 | |
104 | 104 | switch ($modx->config['manager_theme_mode']) { |
105 | 105 | case '1': |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | switch ($installGoingOn) { |
125 | 125 | case 1 : |
126 | 126 | $modx->setPlaceholder('login_message', |
127 | - "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
127 | + "<p><span class=\"fail\">".$_lang["login_cancelled_install_in_progress"]."</p><p>".$_lang["login_message"]."</p>"); |
|
128 | 128 | break; |
129 | 129 | case 2 : |
130 | 130 | $modx->setPlaceholder('login_message', |
131 | - "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
131 | + "<p><span class=\"fail\">".$_lang["login_cancelled_site_was_updated"]."</p><p>".$_lang["login_message"]."</p>"); |
|
132 | 132 | break; |
133 | 133 | } |
134 | 134 | } |
@@ -136,9 +136,9 @@ discard block |
||
136 | 136 | if ($modx->config['use_captcha'] == 1) { |
137 | 137 | $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]); |
138 | 138 | $modx->setPlaceholder('captcha_image', |
139 | - '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'captcha.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>'); |
|
139 | + '<a href="'.MODX_MANAGER_URL.'" class="loginCaptcha"><img id="captcha_image" src="'.MODX_MANAGER_URL.'captcha.php?rand='.rand().'" alt="'.$_lang["login_captcha_message"].'" /></a>'); |
|
140 | 140 | $modx->setPlaceholder('captcha_input', |
141 | - '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
141 | + '<label>'.$_lang["captcha_code"].'</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | // login info |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | // invoke OnManagerLoginFormRender event |
158 | 158 | $evtOut = $modx->invokeEvent('OnManagerLoginFormRender'); |
159 | - $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : ''; |
|
159 | + $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">'.implode('', $evtOut).'</div>' : ''; |
|
160 | 160 | $modx->setPlaceholder('OnManagerLoginFormRender', $html); |
161 | 161 | |
162 | 162 | // load template |
@@ -174,29 +174,29 @@ discard block |
||
174 | 174 | $login_tpl = file_get_contents($target); |
175 | 175 | } |
176 | 176 | } else { |
177 | - $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/'; |
|
178 | - if (is_file($theme_path . 'style.php')) { |
|
179 | - include($theme_path . 'style.php'); |
|
177 | + $theme_path = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/'; |
|
178 | + if (is_file($theme_path.'style.php')) { |
|
179 | + include($theme_path.'style.php'); |
|
180 | 180 | } |
181 | 181 | $chunk = $modx->getChunk($target); |
182 | 182 | if ($chunk !== false && !empty($chunk)) { |
183 | 183 | $login_tpl = $chunk; |
184 | - } elseif (is_file(MODX_BASE_PATH . $target)) { |
|
185 | - $target = MODX_BASE_PATH . $target; |
|
184 | + } elseif (is_file(MODX_BASE_PATH.$target)) { |
|
185 | + $target = MODX_BASE_PATH.$target; |
|
186 | 186 | $login_tpl = file_get_contents($target); |
187 | 187 | } elseif (is_file($target)) { |
188 | 188 | $login_tpl = file_get_contents($target); |
189 | - } elseif (is_file($theme_path . 'login.tpl')) { |
|
190 | - $target = $theme_path . 'login.tpl'; |
|
189 | + } elseif (is_file($theme_path.'login.tpl')) { |
|
190 | + $target = $theme_path.'login.tpl'; |
|
191 | 191 | $login_tpl = file_get_contents($target); |
192 | - } elseif (is_file($theme_path . 'templates/actions/login.tpl')) { |
|
193 | - $target = $theme_path . 'templates/actions/login.tpl'; |
|
192 | + } elseif (is_file($theme_path.'templates/actions/login.tpl')) { |
|
193 | + $target = $theme_path.'templates/actions/login.tpl'; |
|
194 | 194 | $login_tpl = file_get_contents($target); |
195 | - } elseif (is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
196 | - $target = $theme_path . 'html/login.html'; |
|
195 | + } elseif (is_file($theme_path.'html/login.html')) { // ClipperCMS compatible |
|
196 | + $target = $theme_path.'html/login.html'; |
|
197 | 197 | $login_tpl = file_get_contents($target); |
198 | 198 | } else { |
199 | - $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl'; |
|
199 | + $target = MODX_MANAGER_PATH.'media/style/common/login.tpl'; |
|
200 | 200 | $login_tpl = file_get_contents($target); |
201 | 201 | } |
202 | 202 | } |
@@ -216,17 +216,17 @@ discard block |
||
216 | 216 | $modx->updateValidatedUserSession(); |
217 | 217 | |
218 | 218 | // Update last action in table active_users |
219 | - $itemid = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : ''; |
|
219 | + $itemid = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
220 | 220 | $lasthittime = time(); |
221 | - $action = isset($_REQUEST['a']) ? (int)$_REQUEST['a'] : 1; |
|
221 | + $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
|
222 | 222 | |
223 | 223 | if ($action !== 1) { |
224 | - if ((int)$itemid <= 0) { |
|
224 | + if ((int) $itemid <= 0) { |
|
225 | 225 | $itemid = null; |
226 | 226 | } |
227 | 227 | $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)", |
228 | 228 | $modx->getFullTableName('active_users') // Table |
229 | - , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string)$action, |
|
229 | + , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string) $action, |
|
230 | 230 | $itemid == null ? var_export(null, true) : $itemid); |
231 | 231 | $modx->db->query($sql); |
232 | 232 | } |
@@ -8,8 +8,8 @@ |
||
8 | 8 | * @todo could be unnecessary |
9 | 9 | * |
10 | 10 | */ |
11 | -Class TemplateParser extends EvolutionCMS\Legacy\TemplateParser |
|
12 | -{ |
|
11 | +Class TemplateParser extends EvolutionCMS\Legacy\TemplateParser |
|
12 | +{ |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | ?> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * @todo could be unnecessary |
9 | 9 | * |
10 | 10 | */ |
11 | -Class TemplateParser extends EvolutionCMS\Legacy\TemplateParser |
|
11 | +class TemplateParser extends EvolutionCMS\Legacy\TemplateParser |
|
12 | 12 | { |
13 | 13 | } |
14 | 14 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $_ = crc32(__FILE__); |
33 | 33 | $_ = sprintf('%u', $_); |
34 | 34 | |
35 | - return 'evo' . base_convert($_, 10, 36); |
|
35 | + return 'evo'.base_convert($_, 10, 36); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | session_start(); |
58 | 58 | $key = "modx.mgr.session.cookie.lifetime"; |
59 | 59 | if (isset($_SESSION[$key]) && is_numeric($_SESSION[$key])) { |
60 | - $cookieLifetime = (int)$_SESSION[$key]; |
|
60 | + $cookieLifetime = (int) $_SESSION[$key]; |
|
61 | 61 | if ($cookieLifetime) { |
62 | 62 | $cookieExpiration = $_SERVER['REQUEST_TIME'] + $cookieLifetime; |
63 | 63 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(!function_exists('makeHTML')) { |
|
3 | +if (!function_exists('makeHTML')) { |
|
4 | 4 | /** |
5 | 5 | * @param int $indent |
6 | 6 | * @param int $parent |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | case 'publishedon': |
38 | 38 | case 'pub_date': |
39 | 39 | case 'unpub_date': |
40 | - $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.' . $_SESSION['tree_sortby'], |
|
41 | - 'sc.' . $_SESSION['tree_sortby']); |
|
40 | + $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.'.$_SESSION['tree_sortby'], |
|
41 | + 'sc.'.$_SESSION['tree_sortby']); |
|
42 | 42 | break; |
43 | 43 | default: |
44 | - $sortby = 'sc.' . $_SESSION['tree_sortby']; |
|
44 | + $sortby = 'sc.'.$_SESSION['tree_sortby']; |
|
45 | 45 | }; |
46 | 46 | |
47 | - $orderby = $modx->db->escape($sortby . ' ' . $_SESSION['tree_sortdir']); |
|
47 | + $orderby = $modx->db->escape($sortby.' '.$_SESSION['tree_sortdir']); |
|
48 | 48 | |
49 | 49 | // Folder sorting gets special setup ;) Add menuindex and pagetitle |
50 | 50 | if ($_SESSION['tree_sortby'] == 'isfolder') { |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $_SESSION['mgrDocgroups']) : ''; |
60 | 60 | $showProtected = false; |
61 | 61 | if (isset ($modx->config['tree_show_protected'])) { |
62 | - $showProtected = (boolean)$modx->config['tree_show_protected']; |
|
62 | + $showProtected = (boolean) $modx->config['tree_show_protected']; |
|
63 | 63 | } |
64 | - $mgrRole = (isset ($_SESSION['mgrRole']) && (string)$_SESSION['mgrRole'] === '1') ? '1' : '0'; |
|
64 | + $mgrRole = (isset ($_SESSION['mgrRole']) && (string) $_SESSION['mgrRole'] === '1') ? '1' : '0'; |
|
65 | 65 | if ($showProtected == false) { |
66 | - $access = "AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
66 | + $access = "AND (1={$mgrRole} OR sc.privatemgr=0".(!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
67 | 67 | } else { |
68 | 68 | $access = ''; |
69 | 69 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | $weblinkDisplay = $row['type'] == 'reference' ? sprintf(' %s', $_style['tree_linkgo']) : ''; |
103 | - $pageIdDisplay = '<small>(' . ($modx_textdir ? '‏' : '') . $row['id'] . ')</small>'; |
|
103 | + $pageIdDisplay = '<small>('.($modx_textdir ? '‏' : '').$row['id'].')</small>'; |
|
104 | 104 | |
105 | 105 | // Prepare displaying user-locks |
106 | 106 | $lockedByUser = ''; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | 'element_type' => $_lang["lock_element_type_7"], |
112 | 112 | 'lasthit_df' => $rowLock['lasthit_df'] |
113 | 113 | )); |
114 | - $lockedByUser = '<span title="' . $title . '" class="editResource">' . $_style['tree_preview_resource'] . '</span>'; |
|
114 | + $lockedByUser = '<span title="'.$title.'" class="editResource">'.$_style['tree_preview_resource'].'</span>'; |
|
115 | 115 | } else { |
116 | 116 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
117 | 117 | 'element_type' => $_lang["lock_element_type_7"], |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | 'lasthit_df' => $rowLock['lasthit_df'] |
120 | 120 | )); |
121 | 121 | if ($modx->hasPermission('remove_locks')) { |
122 | - $lockedByUser = '<span onclick="modx.tree.unlockElement(7, ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
122 | + $lockedByUser = '<span onclick="modx.tree.unlockElement(7, '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource">'.$_style['icons_secured'].'</span>'; |
|
123 | 123 | } else { |
124 | - $lockedByUser = '<span title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
124 | + $lockedByUser = '<span title="'.$title.'" class="lockedResource">'.$_style['icons_secured'].'</span>'; |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 | } |
@@ -130,22 +130,22 @@ discard block |
||
130 | 130 | |
131 | 131 | $title = ''; |
132 | 132 | if (isDateNode($nodeNameSource)) { |
133 | - $title = $_lang['pagetitle'] . ': ' . $row['pagetitle'] . '[+lf+]'; |
|
133 | + $title = $_lang['pagetitle'].': '.$row['pagetitle'].'[+lf+]'; |
|
134 | 134 | } |
135 | - $title .= $_lang['id'] . ': ' . $row['id']; |
|
136 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_title'] . ': ' . $row['menutitle']; |
|
137 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_index'] . ': ' . $row['menuindex']; |
|
138 | - $title .= '[+lf+]' . $_lang['alias'] . ': ' . (!empty($row['alias']) ? $row['alias'] : '-'); |
|
139 | - $title .= '[+lf+]' . $_lang['template'] . ': ' . $row['templatename']; |
|
140 | - $title .= '[+lf+]' . $_lang['publish_date'] . ': ' . $modx->toDateFormat($row['pub_date']); |
|
141 | - $title .= '[+lf+]' . $_lang['unpublish_date'] . ': ' . $modx->toDateFormat($row['unpub_date']); |
|
142 | - $title .= '[+lf+]' . $_lang['page_data_web_access'] . ': ' . ($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
143 | - $title .= '[+lf+]' . $_lang['page_data_mgr_access'] . ': ' . ($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
144 | - $title .= '[+lf+]' . $_lang['resource_opt_richtext'] . ': ' . ($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
145 | - $title .= '[+lf+]' . $_lang['page_data_searchable'] . ': ' . ($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
146 | - $title .= '[+lf+]' . $_lang['page_data_cacheable'] . ': ' . ($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
135 | + $title .= $_lang['id'].': '.$row['id']; |
|
136 | + $title .= '[+lf+]'.$_lang['resource_opt_menu_title'].': '.$row['menutitle']; |
|
137 | + $title .= '[+lf+]'.$_lang['resource_opt_menu_index'].': '.$row['menuindex']; |
|
138 | + $title .= '[+lf+]'.$_lang['alias'].': '.(!empty($row['alias']) ? $row['alias'] : '-'); |
|
139 | + $title .= '[+lf+]'.$_lang['template'].': '.$row['templatename']; |
|
140 | + $title .= '[+lf+]'.$_lang['publish_date'].': '.$modx->toDateFormat($row['pub_date']); |
|
141 | + $title .= '[+lf+]'.$_lang['unpublish_date'].': '.$modx->toDateFormat($row['unpub_date']); |
|
142 | + $title .= '[+lf+]'.$_lang['page_data_web_access'].': '.($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
143 | + $title .= '[+lf+]'.$_lang['page_data_mgr_access'].': '.($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
144 | + $title .= '[+lf+]'.$_lang['resource_opt_richtext'].': '.($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
145 | + $title .= '[+lf+]'.$_lang['page_data_searchable'].': '.($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
146 | + $title .= '[+lf+]'.$_lang['page_data_cacheable'].': '.($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
147 | 147 | $title = $modx->htmlspecialchars($title); |
148 | - $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
148 | + $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
149 | 149 | |
150 | 150 | $data = array( |
151 | 151 | 'id' => $row['id'], |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | |
231 | 231 | if ($ph['contextmenu']) { |
232 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
232 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | if ($_SESSION['tree_show_only_folders']) { |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | } |
288 | 288 | |
289 | 289 | if ($ph['contextmenu']) { |
290 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
290 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | $node .= $modx->parseText($tpl, $ph); |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | } |
326 | 326 | |
327 | 327 | if ($ph['contextmenu']) { |
328 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
328 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | $node .= $modx->parseText($tpl, $ph); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | } |
377 | 377 | |
378 | 378 | if ($ph['contextmenu']) { |
379 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
379 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | $node .= $modx->parseText($tpl, $ph); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | } |
419 | 419 | |
420 | 420 | if ($ph['contextmenu']) { |
421 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
421 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | $node .= $modx->parseText($tpl, $ph); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | } |
445 | 445 | } |
446 | 446 | |
447 | -if(!function_exists('getIconInfo')) { |
|
447 | +if (!function_exists('getIconInfo')) { |
|
448 | 448 | /** |
449 | 449 | * @param array $_style |
450 | 450 | * @return array |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | } |
479 | 479 | } |
480 | 480 | |
481 | -if(!function_exists('getNodeTitle')) { |
|
481 | +if (!function_exists('getNodeTitle')) { |
|
482 | 482 | /** |
483 | 483 | * @param string $nodeNameSource |
484 | 484 | * @param array $row |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | $nodetitle .= $modx->config['friendly_url_suffix']; |
500 | 500 | } |
501 | 501 | } |
502 | - $nodetitle = $modx->config['friendly_url_prefix'] . $nodetitle; |
|
502 | + $nodetitle = $modx->config['friendly_url_prefix'].$nodetitle; |
|
503 | 503 | break; |
504 | 504 | case 'pagetitle': |
505 | 505 | $nodetitle = $row['pagetitle']; |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | } |
534 | 534 | } |
535 | 535 | |
536 | -if(!function_exists('isDateNode')) { |
|
536 | +if (!function_exists('isDateNode')) { |
|
537 | 537 | /** |
538 | 538 | * @param string $nodeNameSource |
539 | 539 | * @return bool |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | } |
554 | 554 | } |
555 | 555 | |
556 | -if(!function_exists('checkIsFolder')) { |
|
556 | +if (!function_exists('checkIsFolder')) { |
|
557 | 557 | /** |
558 | 558 | * @param int $parent |
559 | 559 | * @param int $isfolder |
@@ -563,11 +563,11 @@ discard block |
||
563 | 563 | { |
564 | 564 | $modx = evolutionCMS(); |
565 | 565 | |
566 | - return (int)$modx->db->getValue($modx->db->query('SELECT count(*) FROM ' . $modx->getFullTableName('site_content') . ' WHERE parent=' . $parent . ' AND isfolder=' . $isfolder . ' ')); |
|
566 | + return (int) $modx->db->getValue($modx->db->query('SELECT count(*) FROM '.$modx->getFullTableName('site_content').' WHERE parent='.$parent.' AND isfolder='.$isfolder.' ')); |
|
567 | 567 | } |
568 | 568 | } |
569 | 569 | |
570 | -if(!function_exists('_htmlentities')) { |
|
570 | +if (!function_exists('_htmlentities')) { |
|
571 | 571 | /** |
572 | 572 | * @param mixed $array |
573 | 573 | * @return string |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | } |
584 | 584 | } |
585 | 585 | |
586 | -if(!function_exists('getTplSingleNode')) { |
|
586 | +if (!function_exists('getTplSingleNode')) { |
|
587 | 587 | /** |
588 | 588 | * @return string |
589 | 589 | */ |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | } |
614 | 614 | } |
615 | 615 | |
616 | -if(!function_exists('getTplFolderNode')) { |
|
616 | +if (!function_exists('getTplFolderNode')) { |
|
617 | 617 | /** |
618 | 618 | * @return string |
619 | 619 | */ |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | title="[+title+]">[+nodetitleDisplay+][+weblinkDisplay+]</span>[+pageIdDisplay+]</a><div>'; |
655 | 655 | } |
656 | 656 | } |
657 | -if(!function_exists('getTplFolderNodeNotChildren')) { |
|
657 | +if (!function_exists('getTplFolderNodeNotChildren')) { |
|
658 | 658 | /** |
659 | 659 | * @return string |
660 | 660 | */ |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * @see https://github.com/theseer/Autoload |
4 | 4 | */ |
5 | 5 | spl_autoload_register( |
6 | - function ($class) { |
|
6 | + function($class){ |
|
7 | 7 | static $classes = null; |
8 | 8 | if ($classes === null) { |
9 | 9 | $classes = array( |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | $cn = strtolower($class); |
36 | 36 | if (isset($classes[$cn])) { |
37 | - require __DIR__ . '/src' . $classes[$cn]; |
|
37 | + require __DIR__.'/src'.$classes[$cn]; |
|
38 | 38 | } |
39 | 39 | }, |
40 | 40 | true, |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * @see https://github.com/theseer/Autoload |
4 | 4 | */ |
5 | 5 | spl_autoload_register( |
6 | - function ($class) { |
|
6 | + function ($class){ |
|
7 | 7 | static $classes = null; |
8 | 8 | if ($classes === null) { |
9 | 9 | $classes = array( |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | header("X-XSS-Protection: 0"); |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | |
48 | 48 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness'); |
49 | 49 | if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
50 | - $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
|
50 | + $body_class .= ' '.$theme_modes[$_COOKIE['MODX_themeMode']]; |
|
51 | 51 | } elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
52 | - $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
|
52 | + $body_class .= ' '.$theme_modes[$modx->config['manager_theme_mode']]; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | $navbar_position = $modx->config['manager_menu_position']; |
@@ -82,36 +82,36 @@ discard block |
||
82 | 82 | $user['which_browser'] = $modx->config['which_browser']; |
83 | 83 | } |
84 | 84 | |
85 | -$css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
|
85 | +$css = 'media/style/'.$modx->config['manager_theme'].'/css/page.css?v='.$lastInstallTime; |
|
86 | 86 | |
87 | 87 | if ($modx->config['manager_theme'] == 'default') { |
88 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
89 | - require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
|
88 | + if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css') && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) { |
|
89 | + require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php'; |
|
90 | 90 | $minifier = new Formatter\CSSMinify(); |
91 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
|
92 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css'); |
|
93 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css'); |
|
94 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css'); |
|
95 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css'); |
|
96 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css'); |
|
97 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css'); |
|
98 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css'); |
|
99 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css'); |
|
100 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css'); |
|
101 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css'); |
|
91 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css'); |
|
92 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css'); |
|
93 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css'); |
|
94 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css'); |
|
95 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css'); |
|
96 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css'); |
|
97 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css'); |
|
98 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css'); |
|
99 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css'); |
|
100 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css'); |
|
101 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css'); |
|
102 | 102 | $css = $minifier->minify(); |
103 | - file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
|
103 | + file_put_contents(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css', $css); |
|
104 | 104 | } |
105 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
106 | - $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
|
105 | + if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) { |
|
106 | + $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime; |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | -$modx->config['global_tabs'] = (int)($modx->config['global_tabs'] && ($user['role'] == 1 || $modx->hasPermission('edit_template') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_plugin'))); |
|
110 | +$modx->config['global_tabs'] = (int) ($modx->config['global_tabs'] && ($user['role'] == 1 || $modx->hasPermission('edit_template') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_plugin'))); |
|
111 | 111 | |
112 | 112 | ?> |
113 | 113 | <!DOCTYPE html> |
114 | -<html <?= (isset($modx_textdir) && $modx_textdir ? 'dir="rtl" lang="' : 'lang="') . $mxla . '" xml:lang="' . $mxla . '"' ?>> |
|
114 | +<html <?= (isset($modx_textdir) && $modx_textdir ? 'dir="rtl" lang="' : 'lang="').$mxla.'" xml:lang="'.$mxla.'"' ?>> |
|
115 | 115 | <head> |
116 | 116 | <title><?= $site_name ?>- (EVO CMS Manager)</title> |
117 | 117 | <meta http-equiv="Content-Type" content="text/html; charset=<?= $modx_manager_charset ?>" /> |
@@ -142,21 +142,21 @@ discard block |
||
142 | 142 | MODX_SITE_URL: '<?= MODX_SITE_URL ?>', |
143 | 143 | MODX_MANAGER_URL: '<?= MODX_MANAGER_URL ?>', |
144 | 144 | user: { |
145 | - role: <?= (int)$user['role'] ?>, |
|
145 | + role: <?= (int) $user['role'] ?>, |
|
146 | 146 | username: '<?= $user['username'] ?>' |
147 | 147 | }, |
148 | 148 | config: { |
149 | 149 | mail_check_timeperiod: <?= $modx->config['mail_check_timeperiod'] ?>, |
150 | - menu_height: <?= (int)$menu_height ?>, |
|
151 | - tree_width: <?= (int)$tree_width ?>, |
|
152 | - tree_min_width: <?= (int)$tree_min_width ?>, |
|
153 | - session_timeout: <?= (int)$modx->config['session_timeout'] ?>, |
|
154 | - site_start: <?= (int)$modx->config['site_start'] ?>, |
|
155 | - tree_page_click: <?=(!empty($modx->config['tree_page_click']) ? (int)$modx->config['tree_page_click'] : 27) ?>, |
|
150 | + menu_height: <?= (int) $menu_height ?>, |
|
151 | + tree_width: <?= (int) $tree_width ?>, |
|
152 | + tree_min_width: <?= (int) $tree_min_width ?>, |
|
153 | + session_timeout: <?= (int) $modx->config['session_timeout'] ?>, |
|
154 | + site_start: <?= (int) $modx->config['site_start'] ?>, |
|
155 | + tree_page_click: <?=(!empty($modx->config['tree_page_click']) ? (int) $modx->config['tree_page_click'] : 27) ?>, |
|
156 | 156 | theme: '<?= $modx->config['manager_theme'] ?>', |
157 | 157 | theme_mode: '<?= $modx->config['manager_theme_mode'] ?>', |
158 | 158 | which_browser: '<?= $user['which_browser'] ?>', |
159 | - layout: <?= (int)$manager_layout ?>, |
|
159 | + layout: <?= (int) $manager_layout ?>, |
|
160 | 160 | textdir: '<?= $modx_textdir ?>', |
161 | 161 | global_tabs: <?= $modx->config['global_tabs'] ?> |
162 | 162 | |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | delete a[b]; |
242 | 242 | }, |
243 | 243 | openedArray: [], |
244 | - lockedElementsTranslation: <?= json_encode($unlockTranslations, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . "\n" ?> |
|
244 | + lockedElementsTranslation: <?= json_encode($unlockTranslations, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE)."\n" ?> |
|
245 | 245 | }; |
246 | 246 | <?php |
247 | 247 | $opened = array_filter(array_map('intval', explode('|', $_SESSION['openedArray']))); |
248 | - echo (empty($opened) ? '' : 'modx.openedArray[' . implode("] = 1;\n modx.openedArray[", $opened) . '] = 1;') . "\n"; |
|
248 | + echo (empty($opened) ? '' : 'modx.openedArray['.implode("] = 1;\n modx.openedArray[", $opened).'] = 1;')."\n"; |
|
249 | 249 | ?> |
250 | 250 | </script> |
251 | 251 | <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/modx.min.js?v=<?= $lastInstallTime ?>"></script> |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | <a href="javascript:;" class="dropdown-toggle" onclick="return false;"> |
328 | 328 | <span class="username"><?= $user['username'] ?></span> |
329 | 329 | <?php if ($user['photo']) { ?> |
330 | - <span class="icon photo" style="background-image: url(<?= MODX_SITE_URL . $user['photo'] ?>);"></span> |
|
330 | + <span class="icon photo" style="background-image: url(<?= MODX_SITE_URL.$user['photo'] ?>);"></span> |
|
331 | 331 | <?php } else { ?> |
332 | 332 | <span class="icon"><?= $_style['menu_user'] ?></span> |
333 | 333 | <?php } ?> |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $version = 'Evolution'; |
355 | 355 | ?> |
356 | 356 | <?php |
357 | - echo sprintf('<li><span class="dropdown-item" title="%s – %s" %s>' . $version . ' %s</span></li>', $site_name, $modx->getVersionData('full_appname'), $style, $modx->config['settings_version']); |
|
357 | + echo sprintf('<li><span class="dropdown-item" title="%s – %s" %s>'.$version.' %s</span></li>', $site_name, $modx->getVersionData('full_appname'), $style, $modx->config['settings_version']); |
|
358 | 358 | ?> |
359 | 359 | </ul> |
360 | 360 | </li> |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | </div> |
536 | 536 | |
537 | 537 | <?php |
538 | - if(!function_exists('constructLink')) { |
|
538 | + if (!function_exists('constructLink')) { |
|
539 | 539 | /** |
540 | 540 | * @param string $action |
541 | 541 | * @param string $img |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | */ |
545 | 545 | function constructLink($action, $img, $text, $allowed) |
546 | 546 | { |
547 | - if ((bool)$allowed) { |
|
547 | + if ((bool) $allowed) { |
|
548 | 548 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, |
549 | 549 | $action); |
550 | 550 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text); |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | <script type="text/javascript"> |
558 | 558 | |
559 | 559 | if (document.getElementById('treeMenu')) { |
560 | - <?php if($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?> |
|
560 | + <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?> |
|
561 | 561 | |
562 | 562 | document.getElementById('treeMenu_openelements').onclick = function(e) { |
563 | 563 | e.preventDefault(); |
@@ -575,12 +575,12 @@ discard block |
||
575 | 575 | } |
576 | 576 | }; |
577 | 577 | <?php } ?> |
578 | - <?php if($use_browser && $modx->hasPermission('assets_images')) { ?> |
|
578 | + <?php if ($use_browser && $modx->hasPermission('assets_images')) { ?> |
|
579 | 579 | |
580 | 580 | document.getElementById('treeMenu_openimages').onclick = function(e) { |
581 | 581 | e.preventDefault(); |
582 | 582 | if (modx.config.global_tabs && !e.shiftKey) { |
583 | - modx.tabs({url: '<?= MODX_MANAGER_URL . 'media/browser/' . $which_browser . '/browse.php?filemanager=media/browser/' . $which_browser . '/browse.php&type=images' ?>', title: '<?= $_lang["images_management"] ?>'}); |
|
583 | + modx.tabs({url: '<?= MODX_MANAGER_URL.'media/browser/'.$which_browser.'/browse.php?filemanager=media/browser/'.$which_browser.'/browse.php&type=images' ?>', title: '<?= $_lang["images_management"] ?>'}); |
|
584 | 584 | } else { |
585 | 585 | var randomNum = '<?= $_lang["files_files"] ?>'; |
586 | 586 | if (e.shiftKey) { |
@@ -593,12 +593,12 @@ discard block |
||
593 | 593 | } |
594 | 594 | }; |
595 | 595 | <?php } ?> |
596 | - <?php if($use_browser && $modx->hasPermission('assets_files')) { ?> |
|
596 | + <?php if ($use_browser && $modx->hasPermission('assets_files')) { ?> |
|
597 | 597 | |
598 | 598 | document.getElementById('treeMenu_openfiles').onclick = function(e) { |
599 | 599 | e.preventDefault(); |
600 | 600 | if (modx.config.global_tabs && !e.shiftKey) { |
601 | - modx.tabs({url: '<?= MODX_MANAGER_URL . 'media/browser/' . $which_browser . '/browse.php?filemanager=media/browser/' . $which_browser . '/browse.php&type=files' ?>', title: '<?= $_lang["files_files"] ?>'}); |
|
601 | + modx.tabs({url: '<?= MODX_MANAGER_URL.'media/browser/'.$which_browser.'/browse.php?filemanager=media/browser/'.$which_browser.'/browse.php&type=files' ?>', title: '<?= $_lang["files_files"] ?>'}); |
|
602 | 602 | } else { |
603 | 603 | var randomNum = '<?= $_lang["files_files"] ?>'; |
604 | 604 | if (e.shiftKey) { |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | |
653 | 653 | </div> |
654 | 654 | <?php if ($modx->config['show_picker'] != "0") { |
655 | - include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php'); |
|
655 | + include('media/style/'.$modx->config['manager_theme'].'/color.switcher.php'); |
|
656 | 656 | } ?> |
657 | 657 | </body> |
658 | 658 | </html> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | header("X-XSS-Protection: 0"); |
@@ -11,22 +11,22 @@ discard block |
||
11 | 11 | |
12 | 12 | $mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en'; |
13 | 13 | |
14 | -if (!isset($modx->config['manager_menu_height'])) { |
|
14 | +if (!isset($modx->config['manager_menu_height'])) { |
|
15 | 15 | $modx->config['manager_menu_height'] = 2.2; // rem |
16 | 16 | } |
17 | 17 | |
18 | -if (!isset($modx->config['manager_tree_width'])) { |
|
18 | +if (!isset($modx->config['manager_tree_width'])) { |
|
19 | 19 | $modx->config['manager_tree_width'] = 20; // rem |
20 | 20 | } |
21 | 21 | |
22 | -if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) { |
|
22 | +if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) { |
|
23 | 23 | $initMainframeAction = $_SESSION['onLoginForwardToAction']; |
24 | 24 | unset($_SESSION['onLoginForwardToAction']); |
25 | -} else { |
|
25 | +} else { |
|
26 | 26 | $initMainframeAction = 2; // welcome.static |
27 | 27 | } |
28 | 28 | |
29 | -if (!isset($_SESSION['tree_show_only_folders'])) { |
|
29 | +if (!isset($_SESSION['tree_show_only_folders'])) { |
|
30 | 30 | $_SESSION['tree_show_only_folders'] = 0; |
31 | 31 | } |
32 | 32 | |
@@ -35,29 +35,29 @@ discard block |
||
35 | 35 | $tree_width = $modx->config['manager_tree_width']; |
36 | 36 | $tree_min_width = 0; |
37 | 37 | |
38 | -if (isset($_COOKIE['MODX_widthSideBar'])) { |
|
38 | +if (isset($_COOKIE['MODX_widthSideBar'])) { |
|
39 | 39 | $MODX_widthSideBar = $_COOKIE['MODX_widthSideBar']; |
40 | -} else { |
|
40 | +} else { |
|
41 | 41 | $MODX_widthSideBar = $tree_width; |
42 | 42 | } |
43 | 43 | |
44 | -if (!$MODX_widthSideBar) { |
|
44 | +if (!$MODX_widthSideBar) { |
|
45 | 45 | $body_class .= 'sidebar-closed'; |
46 | 46 | } |
47 | 47 | |
48 | 48 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness'); |
49 | -if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
|
49 | +if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
|
50 | 50 | $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
51 | -} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
|
51 | +} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
|
52 | 52 | $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
53 | 53 | } |
54 | 54 | |
55 | 55 | $navbar_position = $modx->config['manager_menu_position']; |
56 | -if ($navbar_position == 'left') { |
|
56 | +if ($navbar_position == 'left') { |
|
57 | 57 | $body_class .= ' navbar-left navbar-left-icon-and-text'; |
58 | 58 | } |
59 | 59 | |
60 | -if (isset($modx->pluginCache['ElementsInTree'])) { |
|
60 | +if (isset($modx->pluginCache['ElementsInTree'])) { |
|
61 | 61 | $body_class .= ' ElementsInTree'; |
62 | 62 | } |
63 | 63 | |
@@ -73,19 +73,19 @@ discard block |
||
73 | 73 | 'type8' => $_lang["lock_element_type_8"] |
74 | 74 | ); |
75 | 75 | |
76 | -foreach ($unlockTranslations as $key => $value) { |
|
76 | +foreach ($unlockTranslations as $key => $value) { |
|
77 | 77 | $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
78 | 78 | } |
79 | 79 | |
80 | 80 | $user = $modx->getUserInfo($modx->getLoginUserID()); |
81 | -if ($user['which_browser'] == 'default') { |
|
81 | +if ($user['which_browser'] == 'default') { |
|
82 | 82 | $user['which_browser'] = $modx->config['which_browser']; |
83 | 83 | } |
84 | 84 | |
85 | 85 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
86 | 86 | |
87 | -if ($modx->config['manager_theme'] == 'default') { |
|
88 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
87 | +if ($modx->config['manager_theme'] == 'default') { |
|
88 | + if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
89 | 89 | require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
90 | 90 | $minifier = new Formatter\CSSMinify(); |
91 | 91 | $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $css = $minifier->minify(); |
103 | 103 | file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
104 | 104 | } |
105 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
105 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
106 | 106 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
107 | 107 | } |
108 | 108 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | <?php |
258 | 258 | // invoke OnManagerTopPrerender event |
259 | 259 | $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST); |
260 | - if (is_array($evtOut)) { |
|
260 | + if (is_array($evtOut)) { |
|
261 | 261 | echo implode("\n", $evtOut); |
262 | 262 | } |
263 | 263 | ?> |
@@ -428,11 +428,14 @@ discard block |
||
428 | 428 | <div id="evo-tab-page-home" class="evo-tab-page show iframe-scroller"> |
429 | 429 | <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
430 | 430 | </div> |
431 | - <?php else: ?> |
|
431 | + <?php else { |
|
432 | + : ?> |
|
432 | 433 | <div class="iframe-scroller"> |
433 | 434 | <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
434 | 435 | </div> |
435 | - <?php endif; ?> |
|
436 | + <?php endif; |
|
437 | +} |
|
438 | +?> |
|
436 | 439 | <script> |
437 | 440 | if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) { |
438 | 441 | document.getElementById('mainframe').setAttribute('scrolling', 'no'); |
@@ -451,11 +454,11 @@ discard block |
||
451 | 454 | 'tree_sortdir', |
452 | 455 | 'tree_nodename' |
453 | 456 | ); |
454 | - foreach ($sortParams as $param) { |
|
455 | - if (isset($_REQUEST[$param])) { |
|
457 | + foreach ($sortParams as $param) { |
|
458 | + if (isset($_REQUEST[$param])) { |
|
456 | 459 | $modx->manager->saveLastUserSetting($param, $_REQUEST[$param]); |
457 | 460 | $_SESSION[$param] = $_REQUEST[$param]; |
458 | - } else if (!isset($_SESSION[$param])) { |
|
461 | + } else if (!isset($_SESSION[$param])) { |
|
459 | 462 | $_SESSION[$param] = $modx->manager->getLastUserSetting($param); |
460 | 463 | } |
461 | 464 | } |
@@ -535,16 +538,16 @@ discard block |
||
535 | 538 | </div> |
536 | 539 | |
537 | 540 | <?php |
538 | - if(!function_exists('constructLink')) { |
|
541 | + if(!function_exists('constructLink')) { |
|
539 | 542 | /** |
540 | 543 | * @param string $action |
541 | 544 | * @param string $img |
542 | 545 | * @param string $text |
543 | 546 | * @param bool $allowed |
544 | 547 | */ |
545 | - function constructLink($action, $img, $text, $allowed) |
|
546 | - { |
|
547 | - if ((bool)$allowed) { |
|
548 | + function constructLink($action, $img, $text, $allowed) |
|
549 | + { |
|
550 | + if ((bool)$allowed) { |
|
548 | 551 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, |
549 | 552 | $action); |
550 | 553 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text); |
@@ -651,7 +654,7 @@ discard block |
||
651 | 654 | ?> |
652 | 655 | |
653 | 656 | </div> |
654 | -<?php if ($modx->config['show_picker'] != "0") { |
|
657 | +<?php if ($modx->config['show_picker'] != "0") { |
|
655 | 658 | include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php'); |
656 | 659 | } ?> |
657 | 660 | </body> |