@@ -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); |
@@ -118,16 +118,16 @@ discard block |
||
118 | 118 | for ($i = 0; $i < $tablevel; $i++) { |
119 | 119 | $tabs .= "\t"; |
120 | 120 | } |
121 | - $listhtml = $ordered == true ? $tabs . "<ol class='$ulroot'$typestr>\n" : $tabs . "<ul class='$ulroot'$typestr>\n"; |
|
121 | + $listhtml = $ordered == true ? $tabs."<ol class='$ulroot'$typestr>\n" : $tabs."<ul class='$ulroot'$typestr>\n"; |
|
122 | 122 | foreach ($array as $key => $value) { |
123 | 123 | if (is_array($value)) { |
124 | - $listhtml .= $tabs . "\t<li>" . $key . "\n" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix, |
|
125 | - $type, $ordered, $tablevel + 2) . $tabs . "\t</li>\n"; |
|
124 | + $listhtml .= $tabs."\t<li>".$key."\n".$this->makeList($value, $ulprefix.$ulroot, $ulprefix, |
|
125 | + $type, $ordered, $tablevel + 2).$tabs."\t</li>\n"; |
|
126 | 126 | } else { |
127 | - $listhtml .= $tabs . "\t<li>" . $value . "</li>\n"; |
|
127 | + $listhtml .= $tabs."\t<li>".$value."</li>\n"; |
|
128 | 128 | } |
129 | 129 | } |
130 | - $listhtml .= $ordered == true ? $tabs . "</ol>\n" : $tabs . "</ul>\n"; |
|
130 | + $listhtml .= $ordered == true ? $tabs."</ol>\n" : $tabs."</ul>\n"; |
|
131 | 131 | |
132 | 132 | return $listhtml; |
133 | 133 | } |
@@ -298,9 +298,9 @@ discard block |
||
298 | 298 | $msg = addslashes($modx->db->escape($msg)); |
299 | 299 | if (substr(strtolower($url), 0, 11) == "javascript:") { |
300 | 300 | $act = "__WebAlert();"; |
301 | - $fnc = "function __WebAlert(){" . substr($url, 11) . "};"; |
|
301 | + $fnc = "function __WebAlert(){".substr($url, 11)."};"; |
|
302 | 302 | } else { |
303 | - $act = ($url ? "window.location.href='" . addslashes($url) . "';" : ""); |
|
303 | + $act = ($url ? "window.location.href='".addslashes($url)."';" : ""); |
|
304 | 304 | } |
305 | 305 | $html = "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>"; |
306 | 306 | if ($modx->isFrontend()) { |
@@ -9,6 +9,6 @@ |
||
9 | 9 | return true; |
10 | 10 | } |
11 | 11 | |
12 | -include_once(MODX_MANAGER_PATH . 'includes/extenders/modifiers.class.inc.php'); |
|
12 | +include_once(MODX_MANAGER_PATH.'includes/extenders/modifiers.class.inc.php'); |
|
13 | 13 | $this->filter = new MODIFIERS; |
14 | 14 | return true; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * Time: 14:16 |
6 | 6 | */ |
7 | 7 | |
8 | -if (!include_once MODX_MANAGER_PATH . 'includes/extenders/manager.api.class.inc.php') { |
|
8 | +if (!include_once MODX_MANAGER_PATH.'includes/extenders/manager.api.class.inc.php') { |
|
9 | 9 | return false; |
10 | 10 | } else { |
11 | 11 | $this->manager = new ManagerAPI; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * Time: 14:17 |
7 | 7 | */ |
8 | 8 | |
9 | -if (!include_once(MODX_MANAGER_PATH . 'includes/extenders/modxmailer.class.inc.php')) { |
|
9 | +if (!include_once(MODX_MANAGER_PATH.'includes/extenders/modxmailer.class.inc.php')) { |
|
10 | 10 | return false; |
11 | 11 | } else { |
12 | 12 | $this->mail = new MODxMailer; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
7 | 7 | } |
8 | 8 | |
9 | -require_once(dirname(__FILE__) . '/protect.inc.php'); |
|
9 | +require_once(dirname(__FILE__).'/protect.inc.php'); |
|
10 | 10 | |
11 | 11 | $action = preg_replace('/[^A-Za-z0-9_\-\.\/]/', '', $_POST['action']); |
12 | 12 | $lang = preg_replace('/[^A-Za-z0-9_\s\+\-\.\/]/', '', $_POST['lang']); |
@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | |
24 | 24 | switch (true) { |
25 | 25 | case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/', |
26 | - $lang) && file_exists(dirname(__FILE__) . '/lang/' . $lang . '.inc.php')): { |
|
27 | - include(dirname(__FILE__) . '/lang/' . $lang . '.inc.php'); |
|
26 | + $lang) && file_exists(dirname(__FILE__).'/lang/'.$lang.'.inc.php')): { |
|
27 | + include(dirname(__FILE__).'/lang/'.$lang.'.inc.php'); |
|
28 | 28 | $str = isset($key, $_lang, $_lang[$key]) ? $_lang[$key] : ""; |
29 | 29 | break; |
30 | 30 | } |
31 | 31 | case ($action == 'setsetting' && !empty($key) && !empty($value)): { |
32 | - $sql = "REPLACE INTO " . $modx->getFullTableName("system_settings") . " (setting_name, setting_value) VALUES('{$key}', '{$value}');"; |
|
32 | + $sql = "REPLACE INTO ".$modx->getFullTableName("system_settings")." (setting_name, setting_value) VALUES('{$key}', '{$value}');"; |
|
33 | 33 | $str = "true"; |
34 | 34 | $modx->db->query($sql); |
35 | 35 | $emptyCache = true; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | ---------------------------------------------- */ |
28 | 28 | |
29 | 29 | // include MagPieRSS |
30 | -require_once(MODX_MANAGER_PATH . 'media/rss/rss_fetch.inc'); |
|
30 | +require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc'); |
|
31 | 31 | /** |
32 | 32 | * Convert relative path into absolute url |
33 | 33 | * |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $tmp = parse_url($base); |
42 | 42 | extract($tmp); |
43 | 43 | if (strpos($rel, "//") === 0) { |
44 | - return $scheme . ':' . $rel; |
|
44 | + return $scheme.':'.$rel; |
|
45 | 45 | } |
46 | 46 | // return if already absolute URL |
47 | 47 | if (parse_url($rel, PHP_URL_SCHEME) != '') { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | // queries and anchors |
51 | 51 | if ($rel[0] == '#' || $rel[0] == '?') { |
52 | - return $base . $rel; |
|
52 | + return $base.$rel; |
|
53 | 53 | } |
54 | 54 | // remove non-directory element from path |
55 | 55 | $path = preg_replace('#/[^/]*$#', '', $path); |
@@ -58,13 +58,13 @@ discard block |
||
58 | 58 | $path = ''; |
59 | 59 | } |
60 | 60 | // dirty absolute URL |
61 | - $abs = $host . $path . "/" . $rel; |
|
61 | + $abs = $host.$path."/".$rel; |
|
62 | 62 | // replace '//' or '/./' or '/foo/../' with '/' |
63 | 63 | $abs = preg_replace("/(\/\.?\/)/", "/", $abs); |
64 | 64 | $abs = preg_replace("/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs); |
65 | 65 | |
66 | 66 | // absolute URL is ready! |
67 | - return $scheme . '://' . $abs; |
|
67 | + return $scheme.'://'.$abs; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $feedData = array(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $output = ''; |
75 | 75 | $rss = @fetch_rss($url); |
76 | 76 | if (!$rss) { |
77 | - $feedData[$section] = 'Failed to retrieve ' . $url; |
|
77 | + $feedData[$section] = 'Failed to retrieve '.$url; |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 | $output .= '<ul>'; |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | $description = strip_tags($item['description']); |
89 | 89 | if (strlen($description) > 199) { |
90 | 90 | $description = substr($description, 0, 200); |
91 | - $description .= '...<br />Read <a href="' . $href . '" target="_blank">more</a>.'; |
|
91 | + $description .= '...<br />Read <a href="'.$href.'" target="_blank">more</a>.'; |
|
92 | 92 | } |
93 | - $output .= '<li><a href="' . $href . '" target="_blank">' . $title . '</a> - <b>' . $pubdate . '</b><br />' . $description . '</li>'; |
|
93 | + $output .= '<li><a href="'.$href.'" target="_blank">'.$title.'</a> - <b>'.$pubdate.'</b><br />'.$description.'</li>'; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | $output .= '</ul>'; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $newCat = $modx->db->escape($newCat); |
35 | 35 | $cats = $modx->db->select('id', $modx->getFullTableName('categories'), "category='{$newCat}'"); |
36 | 36 | if ($cat = $modx->db->getValue($cats)) { |
37 | - return (int)$cat; |
|
37 | + return (int) $cat; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | return 0; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $role = $this->role; |
37 | 37 | |
38 | 38 | if ($role == 1) { |
39 | - return true; // administrator - grant all document permissions |
|
39 | + return true; // administrator - grant all document permissions |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if ($modx->config['use_udperms'] == 0 || $modx->config['use_udperms'] == "" || !isset($modx->config['use_udperms'])) { |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | are private to the manager users will not be private to web users if the |
64 | 64 | document group is not assigned to a web user group and visa versa. |
65 | 65 | */ |
66 | - $permissionsok = false; // set permissions to false |
|
66 | + $permissionsok = false; // set permissions to false |
|
67 | 67 | |
68 | 68 | $rs = $modx->db->select( |
69 | 69 | 'count(DISTINCT sc.id)', |
70 | 70 | "{$tblsc} AS sc |
71 | 71 | LEFT JOIN {$tbldg} AS dg on dg.document = sc.id |
72 | 72 | LEFT JOIN {$tbldgn} dgn ON dgn.id = dg.document_group", |
73 | - "sc.id='{$this->document}' AND (" . (empty($docgrp) ? '' : "dg.document_group = " . $docgrp . " ||") . " sc.privatemgr = 0)" |
|
73 | + "sc.id='{$this->document}' AND (".(empty($docgrp) ? '' : "dg.document_group = ".$docgrp." ||")." sc.privatemgr = 0)" |
|
74 | 74 | ); |
75 | 75 | $limit = $modx->db->getValue($rs); |
76 | 76 | if ($limit == 1) { |