@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
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 | global $SystemAlertMsgQueque; |
6 | 6 | // display system alert window if messages are available |
7 | 7 | if(count($SystemAlertMsgQueque) > 0) { |
8 | - include "sysalert.display.inc.php"; |
|
8 | + include "sysalert.display.inc.php"; |
|
9 | 9 | } |
10 | 10 | ?> |
11 | 11 | <script type='text/javascript'> |
@@ -19,17 +19,17 @@ discard block |
||
19 | 19 | </script> |
20 | 20 | <?php |
21 | 21 | if(in_array($modx->getManagerApi()->action, array( |
22 | - 85, |
|
23 | - 27, |
|
24 | - 4, |
|
25 | - 72, |
|
26 | - 13, |
|
27 | - 11, |
|
28 | - 12, |
|
29 | - 87, |
|
30 | - 88 |
|
22 | + 85, |
|
23 | + 27, |
|
24 | + 4, |
|
25 | + 72, |
|
26 | + 13, |
|
27 | + 11, |
|
28 | + 12, |
|
29 | + 87, |
|
30 | + 88 |
|
31 | 31 | ))) { |
32 | - echo $modx->getManagerApi()->loadDatePicker($modx->config['mgr_date_picker_path']); |
|
32 | + echo $modx->getManagerApi()->loadDatePicker($modx->config['mgr_date_picker_path']); |
|
33 | 33 | } |
34 | 34 | ?> |
35 | 35 | </body> |
@@ -1,10 +1,10 @@ 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 | global $SystemAlertMsgQueque; |
6 | 6 | // display system alert window if messages are available |
7 | -if(count($SystemAlertMsgQueque) > 0) { |
|
7 | +if (count($SystemAlertMsgQueque) > 0) { |
|
8 | 8 | include "sysalert.display.inc.php"; |
9 | 9 | } |
10 | 10 | ?> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | }); |
19 | 19 | </script> |
20 | 20 | <?php |
21 | -if(in_array($modx->getManagerApi()->action, array( |
|
21 | +if (in_array($modx->getManagerApi()->action, array( |
|
22 | 22 | 85, |
23 | 23 | 27, |
24 | 24 | 4, |
@@ -1,30 +1,30 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | - /** |
|
4 | - * System Alert Message Queue Display file |
|
5 | - * Written By Raymond Irving, April, 2005 |
|
6 | - * |
|
7 | - * Used to display system alert messages inside the browser |
|
8 | - * |
|
9 | - */ |
|
3 | + /** |
|
4 | + * System Alert Message Queue Display file |
|
5 | + * Written By Raymond Irving, April, 2005 |
|
6 | + * |
|
7 | + * Used to display system alert messages inside the browser |
|
8 | + * |
|
9 | + */ |
|
10 | 10 | |
11 | - require_once(dirname(__FILE__).'/protect.inc.php'); |
|
11 | + require_once(dirname(__FILE__).'/protect.inc.php'); |
|
12 | 12 | |
13 | - $sysMsgs = ""; |
|
14 | - $limit = count($SystemAlertMsgQueque); |
|
15 | - for($i=0;$i<$limit;$i++) { |
|
16 | - $sysMsgs .= $SystemAlertMsgQueque[$i]."<hr sys/>"; |
|
17 | - } |
|
18 | - // reset message queque |
|
19 | - unset($_SESSION['SystemAlertMsgQueque']); |
|
20 | - $_SESSION['SystemAlertMsgQueque'] = array(); |
|
21 | - $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
|
13 | + $sysMsgs = ""; |
|
14 | + $limit = count($SystemAlertMsgQueque); |
|
15 | + for($i=0;$i<$limit;$i++) { |
|
16 | + $sysMsgs .= $SystemAlertMsgQueque[$i]."<hr sys/>"; |
|
17 | + } |
|
18 | + // reset message queque |
|
19 | + unset($_SESSION['SystemAlertMsgQueque']); |
|
20 | + $_SESSION['SystemAlertMsgQueque'] = array(); |
|
21 | + $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
|
22 | 22 | |
23 | - if($sysMsgs!="") { |
|
23 | + if($sysMsgs!="") { |
|
24 | 24 | ?> |
25 | 25 | |
26 | 26 | <?php // fetch the styles |
27 | - echo '<link rel="stylesheet" type="text/css" href="'.MODX_MANAGER_URL.'media/style/'.$manager_theme.'/style.css'.'" />'; |
|
27 | + echo '<link rel="stylesheet" type="text/css" href="'.MODX_MANAGER_URL.'media/style/'.$manager_theme.'/style.css'.'" />'; |
|
28 | 28 | ?> |
29 | 29 | <script type="text/javascript"> |
30 | 30 | // <![CDATA[ |
@@ -42,5 +42,5 @@ discard block |
||
42 | 42 | // ]]> |
43 | 43 | </script> |
44 | 44 | <?php |
45 | - } |
|
45 | + } |
|
46 | 46 | ?> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $sysMsgs = ""; |
14 | 14 | $limit = count($SystemAlertMsgQueque); |
15 | - for($i=0;$i<$limit;$i++) { |
|
15 | + for ($i = 0; $i < $limit; $i++) { |
|
16 | 16 | $sysMsgs .= $SystemAlertMsgQueque[$i]."<hr sys/>"; |
17 | 17 | } |
18 | 18 | // reset message queque |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $_SESSION['SystemAlertMsgQueque'] = array(); |
21 | 21 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
22 | 22 | |
23 | - if($sysMsgs!="") { |
|
23 | + if ($sysMsgs != "") { |
|
24 | 24 | ?> |
25 | 25 | |
26 | 26 | <?php // fetch the styles |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | var sysAlert = new Element('div').setProperties({ |
33 | 33 | 'class': 'sysAlert' |
34 | 34 | }); |
35 | - sysAlert.innerHTML = '<?php echo $modx->getDatabase()->escape($sysMsgs);?>'; |
|
35 | + sysAlert.innerHTML = '<?php echo $modx->getDatabase()->escape($sysMsgs); ?>'; |
|
36 | 36 | var boxHtml = new MooPrompt('<?php echo $_lang['sys_alert']; ?>', sysAlert, { |
37 | 37 | buttons: 1, |
38 | 38 | button1: 'Ok', |
@@ -116,7 +116,8 @@ discard block |
||
116 | 116 | * @return string |
117 | 117 | */ |
118 | 118 | public function getHashType($db_value = '') |
119 | - { // md5 | v1 | phpass |
|
119 | + { |
|
120 | +// md5 | v1 | phpass |
|
120 | 121 | $c = substr($db_value, 0, 1); |
121 | 122 | if ($c === '$') { |
122 | 123 | return 'phpass'; |
@@ -135,7 +136,8 @@ discard block |
||
135 | 136 | * @return string |
136 | 137 | */ |
137 | 138 | public function genV1Hash($password, $seed = '1') |
138 | - { // $seed is user_id basically |
|
139 | + { |
|
140 | +// $seed is user_id basically |
|
139 | 141 | $modx = evolutionCMS(); |
140 | 142 | |
141 | 143 | if (isset($modx->config['pwd_hash_algo']) && !empty($modx->config['pwd_hash_algo'])) { |
@@ -146,33 +146,33 @@ discard block |
||
146 | 146 | $algorithm = 'UNCRYPT'; |
147 | 147 | } |
148 | 148 | |
149 | - $salt = md5($password . $seed); |
|
149 | + $salt = md5($password.$seed); |
|
150 | 150 | |
151 | 151 | switch ($algorithm) { |
152 | 152 | case 'BLOWFISH_Y': |
153 | - $salt = '$2y$07$' . substr($salt, 0, 22); |
|
153 | + $salt = '$2y$07$'.substr($salt, 0, 22); |
|
154 | 154 | break; |
155 | 155 | case 'BLOWFISH_A': |
156 | - $salt = '$2a$07$' . substr($salt, 0, 22); |
|
156 | + $salt = '$2a$07$'.substr($salt, 0, 22); |
|
157 | 157 | break; |
158 | 158 | case 'SHA512': |
159 | - $salt = '$6$' . substr($salt, 0, 16); |
|
159 | + $salt = '$6$'.substr($salt, 0, 16); |
|
160 | 160 | break; |
161 | 161 | case 'SHA256': |
162 | - $salt = '$5$' . substr($salt, 0, 16); |
|
162 | + $salt = '$5$'.substr($salt, 0, 16); |
|
163 | 163 | break; |
164 | 164 | case 'MD5': |
165 | - $salt = '$1$' . substr($salt, 0, 8); |
|
165 | + $salt = '$1$'.substr($salt, 0, 8); |
|
166 | 166 | break; |
167 | 167 | } |
168 | 168 | |
169 | 169 | if ($algorithm !== 'UNCRYPT') { |
170 | - $password = sha1($password) . crypt($password, $salt); |
|
170 | + $password = sha1($password).crypt($password, $salt); |
|
171 | 171 | } else { |
172 | - $password = sha1($salt . $password); |
|
172 | + $password = sha1($salt.$password); |
|
173 | 173 | } |
174 | 174 | |
175 | - $result = strtolower($algorithm) . '>' . md5($salt . $password) . substr(md5($salt), 0, 8); |
|
175 | + $result = strtolower($algorithm).'>'.md5($salt.$password).substr(md5($salt), 0, 8); |
|
176 | 176 | |
177 | 177 | return $result; |
178 | 178 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $check_files = explode("\n", $check_files); |
255 | 255 | foreach ($check_files as $file) { |
256 | 256 | $file = trim($file); |
257 | - $file = MODX_BASE_PATH . $file; |
|
257 | + $file = MODX_BASE_PATH.$file; |
|
258 | 258 | if (!is_file($file)) { |
259 | 259 | continue; |
260 | 260 | } |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $checksum = unserialize($checksum); |
278 | 278 | foreach ($check_files as $file) { |
279 | 279 | $file = trim($file); |
280 | - $filePath = MODX_BASE_PATH . $file; |
|
280 | + $filePath = MODX_BASE_PATH.$file; |
|
281 | 281 | if (!is_file($filePath)) { |
282 | 282 | continue; |
283 | 283 | } |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | { |
297 | 297 | $modx = evolutionCMS(); |
298 | 298 | $tbl_system_settings = $modx->getDatabase()->getFullTableName('system_settings'); |
299 | - $sql = "REPLACE INTO {$tbl_system_settings} (setting_name, setting_value) VALUES ('sys_files_checksum','" . $modx->getDatabase()->escape($checksum) . "')"; |
|
299 | + $sql = "REPLACE INTO {$tbl_system_settings} (setting_name, setting_value) VALUES ('sys_files_checksum','".$modx->getDatabase()->escape($checksum)."')"; |
|
300 | 300 | $modx->getDatabase()->query($sql); |
301 | 301 | } |
302 | 302 | |
@@ -373,10 +373,10 @@ discard block |
||
373 | 373 | foreach ($settings as $key => $val) { |
374 | 374 | $f = array(); |
375 | 375 | $f['user'] = $_SESSION['mgrInternalKey']; |
376 | - $f['setting_name'] = '_LAST_' . $key; |
|
376 | + $f['setting_name'] = '_LAST_'.$key; |
|
377 | 377 | $f['setting_value'] = $val; |
378 | 378 | $f = $modx->getDatabase()->escape($f); |
379 | - $f = "(`" . implode("`, `", array_keys($f)) . "`) VALUES('" . implode("', '", array_values($f)) . "')"; |
|
379 | + $f = "(`".implode("`, `", array_keys($f))."`) VALUES('".implode("', '", array_values($f))."')"; |
|
380 | 380 | $f .= " ON DUPLICATE KEY UPDATE setting_value = VALUES(setting_value)"; |
381 | 381 | $modx->getDatabase()->insert($f, $modx->getDatabase()->getFullTableName('user_settings')); |
382 | 382 | } |
@@ -279,7 +279,8 @@ discard block |
||
279 | 279 | $row['count'] = $this->count; |
280 | 280 | $row['url'] = $modx->makeUrl($row['id']); |
281 | 281 | |
282 | - if (!$row['wasNull']) { // needs writing a document |
|
282 | + if (!$row['wasNull']) { |
|
283 | +// needs writing a document |
|
283 | 284 | $docname = $this->getFileName($row['id'], $row['alias'], $prefix, $suffix); |
284 | 285 | $filename = $dirpath . $docname; |
285 | 286 | if (!is_file($filename)) { |
@@ -307,7 +308,8 @@ discard block |
||
307 | 308 | $this->output[] = $this->parsePlaceholder($_lang['export_site_exporting_document'], $row); |
308 | 309 | } |
309 | 310 | if ($row['isfolder'] === '1' && ($modx->config['suffix_mode'] !== '1' || strpos($row['alias'], |
310 | - '.') === false)) { // needs making a folder |
|
311 | + '.') === false)) { |
|
312 | +// needs making a folder |
|
311 | 313 | $end_dir = ($row['alias'] !== '') ? $row['alias'] : $row['id']; |
312 | 314 | $dir_path = $dirpath . $end_dir; |
313 | 315 | if (strpos($dir_path, MODX_BASE_PATH) === false) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->count = 0; |
60 | 60 | $this->setUrlMode(); |
61 | 61 | $this->generate_mode = 'crawl'; |
62 | - $this->targetDir = $modx->config['base_path'] . 'temp/export'; |
|
62 | + $this->targetDir = $modx->config['base_path'].'temp/export'; |
|
63 | 63 | if (!isset($this->total)) { |
64 | 64 | $this->getTotal(); |
65 | 65 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | $ignore_ids = array_filter(array_map('intval', explode(',', $ignore_ids))); |
116 | 116 | if (count($ignore_ids) > 0) { |
117 | - $ignore_ids = "AND NOT id IN ('" . implode("','", $ignore_ids) . "')"; |
|
117 | + $ignore_ids = "AND NOT id IN ('".implode("','", $ignore_ids)."')"; |
|
118 | 118 | } else { |
119 | 119 | $ignore_ids = ''; |
120 | 120 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $noncache = ($noncache == 1) ? '' : 'AND cacheable=1'; |
125 | 125 | $where = "deleted=0 AND ((published=1 AND type='document') OR (isfolder=1)) {$noncache} {$ignore_ids}"; |
126 | 126 | $rs = $modx->getDatabase()->select('count(id)', $tbl_site_content, $where); |
127 | - $this->total = (int)$modx->getDatabase()->getValue($rs); |
|
127 | + $this->total = (int) $modx->getDatabase()->getValue($rs); |
|
128 | 128 | |
129 | 129 | return $this->total; |
130 | 130 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } elseif (!is_readable($directory)) { |
154 | 154 | return $rs; |
155 | 155 | } else { |
156 | - $files = glob($directory . '/*'); |
|
156 | + $files = glob($directory.'/*'); |
|
157 | 157 | if (!empty($files)) { |
158 | 158 | foreach ($files as $path) { |
159 | 159 | $rs = is_dir($path) ? $this->removeDirectoryAll($path) : unlink($path); |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | $_lang = $back_lang; |
184 | 184 | } else { |
185 | - $src = $this->curl_get_contents(MODX_SITE_URL . "index.php?id={$docid}"); |
|
185 | + $src = $this->curl_get_contents(MODX_SITE_URL."index.php?id={$docid}"); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | |
@@ -217,12 +217,12 @@ discard block |
||
217 | 217 | $modx = evolutionCMS(); |
218 | 218 | |
219 | 219 | if ($alias === '') { |
220 | - $filename = $prefix . $docid . $suffix; |
|
220 | + $filename = $prefix.$docid.$suffix; |
|
221 | 221 | } else { |
222 | 222 | if ($modx->config['suffix_mode'] === '1' && strpos($alias, '.') !== false) { |
223 | 223 | $suffix = ''; |
224 | 224 | } |
225 | - $filename = $prefix . $alias . $suffix; |
|
225 | + $filename = $prefix.$alias.$suffix; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | return $filename; |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | $tbl_site_content = $modx->getDatabase()->getFullTableName('site_content'); |
241 | 241 | |
242 | 242 | $ignore_ids = $this->ignore_ids; |
243 | - $dirpath = $this->targetDir . '/'; |
|
243 | + $dirpath = $this->targetDir.'/'; |
|
244 | 244 | |
245 | 245 | $prefix = $modx->config['friendly_url_prefix']; |
246 | 246 | $suffix = $modx->config['friendly_url_suffix']; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | $ph['status'] = 'fail'; |
252 | 252 | $ph['msg1'] = $_lang['export_site_failed']; |
253 | - $ph['msg2'] = $_lang["export_site_failed_no_write"] . ' - ' . $dirpath; |
|
253 | + $ph['msg2'] = $_lang["export_site_failed_no_write"].' - '.$dirpath; |
|
254 | 254 | $msg_failed_no_write = $this->parsePlaceholder($tpl, $ph); |
255 | 255 | |
256 | 256 | $ph['msg2'] = $_lang["export_site_failed_no_retrieve"]; |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | |
284 | 284 | if (!$row['wasNull']) { // needs writing a document |
285 | 285 | $docname = $this->getFileName($row['id'], $row['alias'], $prefix, $suffix); |
286 | - $filename = $dirpath . $docname; |
|
286 | + $filename = $dirpath.$docname; |
|
287 | 287 | if (!is_file($filename)) { |
288 | 288 | if ($row['published'] === '1') { |
289 | 289 | $status = $this->makeFile($row['id'], $filename); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | if ($row['isfolder'] === '1' && ($modx->config['suffix_mode'] !== '1' || strpos($row['alias'], |
312 | 312 | '.') === false)) { // needs making a folder |
313 | 313 | $end_dir = ($row['alias'] !== '') ? $row['alias'] : $row['id']; |
314 | - $dir_path = $dirpath . $end_dir; |
|
314 | + $dir_path = $dirpath.$end_dir; |
|
315 | 315 | if (strpos($dir_path, MODX_BASE_PATH) === false) { |
316 | 316 | return false; |
317 | 317 | } |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | |
328 | 328 | if ($modx->config['make_folders'] === '1' && $row['published'] === '1') { |
329 | 329 | if (!empty($filename) && is_file($filename)) { |
330 | - rename($filename, $dir_path . '/index.html'); |
|
330 | + rename($filename, $dir_path.'/index.html'); |
|
331 | 331 | } |
332 | 332 | } |
333 | 333 | $this->targetDir = $dir_path; |
@@ -351,8 +351,8 @@ discard block |
||
351 | 351 | |
352 | 352 | $ch = curl_init(); |
353 | 353 | curl_setopt($ch, CURLOPT_URL, $url); |
354 | - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // 0 = DO NOT VERIFY AUTHENTICITY OF SSL-CERT |
|
355 | - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // 2 = CERT MUST INDICATE BEING CONNECTED TO RIGHT SERVER |
|
354 | + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // 0 = DO NOT VERIFY AUTHENTICITY OF SSL-CERT |
|
355 | + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // 2 = CERT MUST INDICATE BEING CONNECTED TO RIGHT SERVER |
|
356 | 356 | curl_setopt($ch, CURLOPT_HEADER, false); |
357 | 357 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
358 | 358 | curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $role = $this->role; |
40 | 40 | |
41 | 41 | if ($role == 1) { |
42 | - return true; // administrator - grant all document permissions |
|
42 | + return true; // administrator - grant all document permissions |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | if ($modx->config['use_udperms'] == 0 || $modx->config['use_udperms'] == "" || !isset($modx->config['use_udperms'])) { |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | are private to the manager users will not be private to web users if the |
67 | 67 | document group is not assigned to a web user group and visa versa. |
68 | 68 | */ |
69 | - $permissionsok = false; // set permissions to false |
|
69 | + $permissionsok = false; // set permissions to false |
|
70 | 70 | |
71 | 71 | $rs = $modx->getDatabase()->select( |
72 | 72 | 'count(DISTINCT sc.id)', |
73 | 73 | "{$tblsc} AS sc |
74 | 74 | LEFT JOIN {$tbldg} AS dg on dg.document = sc.id |
75 | 75 | LEFT JOIN {$tbldgn} dgn ON dgn.id = dg.document_group", |
76 | - "sc.id='{$this->document}' AND (" . (empty($docgrp) ? '' : "dg.document_group = " . $docgrp . " ||") . " sc.privatemgr = 0)" |
|
76 | + "sc.id='{$this->document}' AND (".(empty($docgrp) ? '' : "dg.document_group = ".$docgrp." ||")." sc.privatemgr = 0)" |
|
77 | 77 | ); |
78 | 78 | $limit = $modx->getDatabase()->getValue($rs); |
79 | 79 | if ($limit == 1) { |
@@ -5,10 +5,10 @@ |
||
5 | 5 | class DeprecatedCore implements DeprecatedCoreInterface |
6 | 6 | { |
7 | 7 | /** |
8 | - * @deprecated |
|
9 | - * |
|
10 | - * return @void |
|
11 | - */ |
|
8 | + * @deprecated |
|
9 | + * |
|
10 | + * return @void |
|
11 | + */ |
|
12 | 12 | public function dbConnect() |
13 | 13 | { |
14 | 14 | $modx = evolutionCMS(); |
@@ -119,16 +119,16 @@ discard block |
||
119 | 119 | for ($i = 0; $i < $tablevel; $i++) { |
120 | 120 | $tabs .= "\t"; |
121 | 121 | } |
122 | - $listhtml = $ordered == true ? $tabs . "<ol class='$ulroot'$typestr>\n" : $tabs . "<ul class='$ulroot'$typestr>\n"; |
|
122 | + $listhtml = $ordered == true ? $tabs."<ol class='$ulroot'$typestr>\n" : $tabs."<ul class='$ulroot'$typestr>\n"; |
|
123 | 123 | foreach ($array as $key => $value) { |
124 | 124 | if (is_array($value)) { |
125 | - $listhtml .= $tabs . "\t<li>" . $key . "\n" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix, |
|
126 | - $type, $ordered, $tablevel + 2) . $tabs . "\t</li>\n"; |
|
125 | + $listhtml .= $tabs."\t<li>".$key."\n".$this->makeList($value, $ulprefix.$ulroot, $ulprefix, |
|
126 | + $type, $ordered, $tablevel + 2).$tabs."\t</li>\n"; |
|
127 | 127 | } else { |
128 | - $listhtml .= $tabs . "\t<li>" . $value . "</li>\n"; |
|
128 | + $listhtml .= $tabs."\t<li>".$value."</li>\n"; |
|
129 | 129 | } |
130 | 130 | } |
131 | - $listhtml .= $ordered == true ? $tabs . "</ol>\n" : $tabs . "</ul>\n"; |
|
131 | + $listhtml .= $ordered == true ? $tabs."</ol>\n" : $tabs."</ul>\n"; |
|
132 | 132 | |
133 | 133 | return $listhtml; |
134 | 134 | } |
@@ -299,9 +299,9 @@ discard block |
||
299 | 299 | $msg = addslashes($modx->getDatabase()->escape($msg)); |
300 | 300 | if (substr(strtolower($url), 0, 11) == "javascript:") { |
301 | 301 | $act = "__WebAlert();"; |
302 | - $fnc = "function __WebAlert(){" . substr($url, 11) . "};"; |
|
302 | + $fnc = "function __WebAlert(){".substr($url, 11)."};"; |
|
303 | 303 | } else { |
304 | - $act = ($url ? "window.location.href='" . addslashes($url) . "';" : ""); |
|
304 | + $act = ($url ? "window.location.href='".addslashes($url)."';" : ""); |
|
305 | 305 | } |
306 | 306 | $html = "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>"; |
307 | 307 | if ($modx->isFrontend()) { |
@@ -177,7 +177,8 @@ |
||
177 | 177 | * @return bool|string |
178 | 178 | */ |
179 | 179 | public function putChunk($chunkName) |
180 | - { // alias name >.< |
|
180 | + { |
|
181 | +// alias name >.< |
|
181 | 182 | $modx = evolutionCMS(); |
182 | 183 | |
183 | 184 | return $modx->getChunk($chunkName); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $this->portable_hashes = $portable_hashes; |
50 | 50 | |
51 | - $this->random_state = microtime() . uniqid(mt_rand(), true); |
|
51 | + $this->random_state = microtime().uniqid(mt_rand(), true); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $output = ''; |
69 | 69 | for ($i = 0; $i < $count; $i += 16) { |
70 | 70 | $this->random_state = |
71 | - md5(microtime() . $this->random_state); |
|
71 | + md5(microtime().$this->random_state); |
|
72 | 72 | $output .= |
73 | 73 | pack('H*', md5($this->random_state)); |
74 | 74 | } |
@@ -160,9 +160,9 @@ discard block |
||
160 | 160 | // consequently in lower iteration counts and hashes that are |
161 | 161 | // quicker to crack (by non-PHP code). |
162 | 162 | |
163 | - $hash = md5($salt . $password, true); |
|
163 | + $hash = md5($salt.$password, true); |
|
164 | 164 | do { |
165 | - $hash = md5($hash . $password, true); |
|
165 | + $hash = md5($hash.$password, true); |
|
166 | 166 | } while (--$count); |
167 | 167 | |
168 | 168 | $output = substr($setting, 0, 12); |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | { |
86 | 86 | global $_lang, $_style; |
87 | 87 | |
88 | - $filename = trim($view_name) . '.tpl.phtml'; |
|
89 | - $file = self::get('views_dir') . $filename; |
|
88 | + $filename = trim($view_name).'.tpl.phtml'; |
|
89 | + $file = self::get('views_dir').$filename; |
|
90 | 90 | $view = &$this; |
91 | 91 | |
92 | 92 | if (is_file($file) |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | { |
112 | 112 | |
113 | 113 | $_update = array( |
114 | - 'id' => (int)$element_id, |
|
115 | - 'category' => (int)$category_id |
|
114 | + 'id' => (int) $element_id, |
|
115 | + 'category' => (int) $category_id |
|
116 | 116 | ); |
117 | 117 | |
118 | 118 | $this->getDatabase()->update( |
119 | 119 | $_update, |
120 | 120 | $this->db_tbl[$element], |
121 | - "`id` = '" . (int)$element_id . "'" |
|
121 | + "`id` = '".(int) $element_id."'" |
|
122 | 122 | ); |
123 | 123 | |
124 | 124 | return $this->getDatabase()->getAffectedRows() === 1; |
@@ -2,4 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Exception; |
4 | 4 | |
5 | -class ServiceNotFoundException extends Exception{} |
|
5 | +class ServiceNotFoundException extends Exception |
|
6 | +{ |
|
7 | +} |