@@ -1,16 +1,32 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $this->old = new OldFunctions(); |
3 | -class OldFunctions { |
|
3 | +class OldFunctions |
|
4 | +{ |
|
4 | 5 | |
5 | - function dbConnect() {global $modx; $modx->db->connect();$modx->rs = $modx->db->conn;} |
|
6 | - function dbQuery($sql) {global $modx;return $modx->db->query($sql);} |
|
7 | - function recordCount($rs) {global $modx;return $modx->db->getRecordCount($rs);} |
|
8 | - function fetchRow($rs,$mode='assoc') {global $modx;return $modx->db->getRow($rs, $mode);} |
|
9 | - function affectedRows($rs) {global $modx;return $modx->db->getAffectedRows($rs);} |
|
10 | - function insertId($rs) {global $modx;return $modx->db->getInsertId($rs);} |
|
11 | - function dbClose() {global $modx; $modx->db->disconnect();} |
|
6 | + function dbConnect() |
|
7 | + { |
|
8 | +global $modx; $modx->db->connect();$modx->rs = $modx->db->conn;} |
|
9 | + function dbQuery($sql) |
|
10 | + { |
|
11 | +global $modx;return $modx->db->query($sql);} |
|
12 | + function recordCount($rs) |
|
13 | + { |
|
14 | +global $modx;return $modx->db->getRecordCount($rs);} |
|
15 | + function fetchRow($rs,$mode='assoc') |
|
16 | + { |
|
17 | +global $modx;return $modx->db->getRow($rs, $mode);} |
|
18 | + function affectedRows($rs) |
|
19 | + { |
|
20 | +global $modx;return $modx->db->getAffectedRows($rs);} |
|
21 | + function insertId($rs) |
|
22 | + { |
|
23 | +global $modx;return $modx->db->getInsertId($rs);} |
|
24 | + function dbClose() |
|
25 | + { |
|
26 | +global $modx; $modx->db->disconnect();} |
|
12 | 27 | |
13 | - function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) { |
|
28 | + function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) |
|
29 | + { |
|
14 | 30 | // first find out whether the value passed is an array |
15 | 31 | if (!is_array($array)) { |
16 | 32 | return "<ul><li>Bad list</li></ul>"; |
@@ -37,7 +53,8 @@ discard block |
||
37 | 53 | } |
38 | 54 | |
39 | 55 | |
40 | - function getUserData() { |
|
56 | + function getUserData() |
|
57 | + { |
|
41 | 58 | $client['ip'] = $_SERVER['REMOTE_ADDR']; |
42 | 59 | $client['ua'] = $_SERVER['HTTP_USER_AGENT']; |
43 | 60 | return $client; |
@@ -45,35 +62,42 @@ discard block |
||
45 | 62 | |
46 | 63 | # Returns true, install or interact when inside manager |
47 | 64 | // deprecated |
48 | - function insideManager() { |
|
65 | + function insideManager() |
|
66 | + { |
|
49 | 67 | $m= false; |
50 | 68 | if( defined('IN_MANAGER_MODE') && IN_MANAGER_MODE === true) { |
51 | 69 | $m= true; |
52 | - if (defined('SNIPPET_INTERACTIVE_MODE') && SNIPPET_INTERACTIVE_MODE == 'true') |
|
53 | - $m= "interact"; |
|
54 | - else |
|
55 | - if (defined('SNIPPET_INSTALL_MODE') && SNIPPET_INSTALL_MODE == 'true') |
|
56 | - $m= "install"; |
|
70 | + if (defined('SNIPPET_INTERACTIVE_MODE') && SNIPPET_INTERACTIVE_MODE == 'true') { |
|
71 | + $m= "interact"; |
|
72 | + } else |
|
73 | + if (defined('SNIPPET_INSTALL_MODE') && SNIPPET_INSTALL_MODE == 'true') { |
|
74 | + $m= "install"; |
|
75 | + } |
|
57 | 76 | } |
58 | 77 | return $m; |
59 | 78 | } |
60 | 79 | |
61 | 80 | // deprecated |
62 | - function putChunk($chunkName) { // alias name >.< |
|
81 | + function putChunk($chunkName) |
|
82 | + { |
|
83 | +// alias name >.< |
|
63 | 84 | global $modx; |
64 | 85 | return $modx->getChunk($chunkName); |
65 | 86 | } |
66 | 87 | |
67 | - function getDocGroups() { |
|
88 | + function getDocGroups() |
|
89 | + { |
|
68 | 90 | global $modx; |
69 | 91 | return $modx->getUserDocGroups(); |
70 | 92 | } // deprecated |
71 | 93 | |
72 | - function changePassword($o, $n) { |
|
94 | + function changePassword($o, $n) |
|
95 | + { |
|
73 | 96 | return changeWebUserPassword($o, $n); |
74 | 97 | } // deprecated |
75 | 98 | |
76 | - function userLoggedIn() { |
|
99 | + function userLoggedIn() |
|
100 | + { |
|
77 | 101 | global $modx; |
78 | 102 | $userdetails= array (); |
79 | 103 | if ($modx->isFrontend() && isset ($_SESSION['webValidated'])) { |
@@ -96,18 +120,22 @@ discard block |
||
96 | 120 | } |
97 | 121 | } |
98 | 122 | |
99 | - function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) { |
|
123 | + function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) |
|
124 | + { |
|
100 | 125 | // function to retrieve form results into an associative array |
101 | 126 | global $modx; |
102 | 127 | $results= array (); |
103 | 128 | $method= strtoupper($method); |
104 | - if ($method == "") |
|
105 | - $method= $REQUEST_METHOD; |
|
106 | - if ($method == "POST") |
|
107 | - $method= & $_POST; |
|
108 | - elseif ($method == "GET") $method= & $_GET; |
|
109 | - else |
|
110 | - return false; |
|
129 | + if ($method == "") { |
|
130 | + $method= $REQUEST_METHOD; |
|
131 | + } |
|
132 | + if ($method == "POST") { |
|
133 | + $method= & $_POST; |
|
134 | + } elseif ($method == "GET") { |
|
135 | + $method= & $_GET; |
|
136 | + } else { |
|
137 | + return false; |
|
138 | + } |
|
111 | 139 | reset($method); |
112 | 140 | foreach ($method as $key => $value) { |
113 | 141 | if (($prefix != "") && (substr($key, 0, strlen($prefix)) == $prefix)) { |
@@ -115,10 +143,12 @@ discard block |
||
115 | 143 | $pieces= explode($prefix, $key, 2); |
116 | 144 | $key= $pieces[1]; |
117 | 145 | $results[$key]= $value; |
118 | - } else |
|
119 | - $results[$key]= $value; |
|
146 | + } else { |
|
147 | + $results[$key]= $value; |
|
148 | + } |
|
149 | + } elseif ($prefix == "") { |
|
150 | + $results[$key]= $value; |
|
120 | 151 | } |
121 | - elseif ($prefix == "") $results[$key]= $value; |
|
122 | 152 | } |
123 | 153 | return $results; |
124 | 154 | } |
@@ -129,7 +159,8 @@ discard block |
||
129 | 159 | * @param string $msg Message to show |
130 | 160 | * @param string $url URL to redirect to |
131 | 161 | */ |
132 | - function webAlert($msg, $url= "") { |
|
162 | + function webAlert($msg, $url= "") |
|
163 | + { |
|
133 | 164 | global $modx; |
134 | 165 | $msg= addslashes($modx->db->escape($msg)); |
135 | 166 | if (substr(strtolower($url), 0, 11) == "javascript:") { |
@@ -139,9 +170,9 @@ discard block |
||
139 | 170 | $act= ($url ? "window.location.href='" . addslashes($url) . "';" : ""); |
140 | 171 | } |
141 | 172 | $html= "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>"; |
142 | - if ($modx->isFrontend()) |
|
143 | - $modx->regClientScript($html); |
|
144 | - else { |
|
173 | + if ($modx->isFrontend()) { |
|
174 | + $modx->regClientScript($html); |
|
175 | + } else { |
|
145 | 176 | echo $html; |
146 | 177 | } |
147 | 178 | } |
@@ -280,14 +280,16 @@ discard block |
||
280 | 280 | /** |
281 | 281 | * @return string |
282 | 282 | */ |
283 | - public function getMIMEHeader() { |
|
283 | + public function getMIMEHeader() |
|
284 | + { |
|
284 | 285 | return $this->MIMEHeader; |
285 | 286 | } |
286 | 287 | |
287 | 288 | /** |
288 | 289 | * @return string |
289 | 290 | */ |
290 | - public function getMIMEBody() { |
|
291 | + public function getMIMEBody() |
|
292 | + { |
|
291 | 293 | return $this->MIMEBody; |
292 | 294 | } |
293 | 295 | |
@@ -296,7 +298,8 @@ discard block |
||
296 | 298 | * |
297 | 299 | * @return $this |
298 | 300 | */ |
299 | - public function setMIMEHeader($header = '') { |
|
301 | + public function setMIMEHeader($header = '') |
|
302 | + { |
|
300 | 303 | $this->MIMEHeader = $header; |
301 | 304 | |
302 | 305 | return $this; |
@@ -307,7 +310,8 @@ discard block |
||
307 | 310 | * |
308 | 311 | * @return $this |
309 | 312 | */ |
310 | - public function setMIMEBody($body = '') { |
|
313 | + public function setMIMEBody($body = '') |
|
314 | + { |
|
311 | 315 | $this->MIMEBody = $body; |
312 | 316 | |
313 | 317 | return $this; |
@@ -318,7 +322,8 @@ discard block |
||
318 | 322 | * |
319 | 323 | * @return $this |
320 | 324 | */ |
321 | - public function setMailHeader($header = '') { |
|
325 | + public function setMailHeader($header = '') |
|
326 | + { |
|
322 | 327 | $this->mailHeader = $header; |
323 | 328 | |
324 | 329 | return $this; |
@@ -327,7 +332,8 @@ discard block |
||
327 | 332 | /** |
328 | 333 | * @return string |
329 | 334 | */ |
330 | - public function getMessageID() { |
|
335 | + public function getMessageID() |
|
336 | + { |
|
331 | 337 | return trim($this->lastMessageID,'<>'); |
332 | 338 | } |
333 | 339 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $str = ''; |
23 | 23 | $emptyCache = false; |
24 | 24 | |
25 | -switch(true){ |
|
25 | +switch(true) { |
|
26 | 26 | case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/',$lang) && file_exists(dirname(__FILE__) . '/lang/'.$lang.'.inc.php')):{ |
27 | 27 | include(dirname(__FILE__) . '/lang/'.$lang.'.inc.php'); |
28 | 28 | $str = isset($key,$_lang,$_lang[$key]) ? $_lang[$key] : "" ; |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | $warningspresent = 0; |
20 | 20 | |
21 | 21 | $sysfiles_check = $modx->manager->checkSystemChecksum(); |
22 | -if ($sysfiles_check!=='0'){ |
|
22 | +if ($sysfiles_check!=='0') { |
|
23 | 23 | $warningspresent = 1; |
24 | 24 | $warnings[] = array($_lang['configcheck_sysfiles_mod']); |
25 | 25 | } |
26 | 26 | |
27 | -if (is_writable("includes/config.inc.php")){ |
|
27 | +if (is_writable("includes/config.inc.php")) { |
|
28 | 28 | // Warn if world writable |
29 | 29 | if(@fileperms('includes/config.inc.php') & 0x0002) { |
30 | 30 | $warningspresent = 1; |
@@ -117,7 +117,8 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | if (!function_exists('checkSiteCache')) { |
120 | - function checkSiteCache() { |
|
120 | + function checkSiteCache() |
|
121 | + { |
|
121 | 122 | global $modx; |
122 | 123 | $checked= true; |
123 | 124 | if (file_exists($modx->config['base_path'] . 'assets/cache/siteCache.idx.php')) { |
@@ -156,26 +157,36 @@ discard block |
||
156 | 157 | |
157 | 158 | if ($warningspresent==1) { |
158 | 159 | |
159 | -if(!isset($modx->config['send_errormail'])) $modx->config['send_errormail']='3'; |
|
160 | +if(!isset($modx->config['send_errormail'])) { |
|
161 | + $modx->config['send_errormail']='3'; |
|
162 | +} |
|
160 | 163 | $config_check_results = "<h3>".$_lang['configcheck_notok']."</h3>"; |
161 | 164 | |
162 | 165 | for ($i=0;$i<count($warnings);$i++) { |
163 | 166 | switch ($warnings[$i][0]) { |
164 | 167 | case $_lang['configcheck_configinc']; |
165 | 168 | $warnings[$i][1] = $_lang['configcheck_configinc_msg']; |
166 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_configinc']); |
|
169 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
170 | + $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_configinc']); |
|
171 | + } |
|
167 | 172 | break; |
168 | 173 | case $_lang['configcheck_installer'] : |
169 | 174 | $warnings[$i][1] = $_lang['configcheck_installer_msg']; |
170 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_installer']); |
|
175 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
176 | + $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_installer']); |
|
177 | + } |
|
171 | 178 | break; |
172 | 179 | case $_lang['configcheck_cache'] : |
173 | 180 | $warnings[$i][1] = $_lang['configcheck_cache_msg']; |
174 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_cache']); |
|
181 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
182 | + $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_cache']); |
|
183 | + } |
|
175 | 184 | break; |
176 | 185 | case $_lang['configcheck_images'] : |
177 | 186 | $warnings[$i][1] = $_lang['configcheck_images_msg']; |
178 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_images']); |
|
187 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
188 | + $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_images']); |
|
189 | + } |
|
179 | 190 | break; |
180 | 191 | case $_lang['configcheck_sysfiles_mod']: |
181 | 192 | $warnings[$i][1] = $_lang["configcheck_sysfiles_mod_msg"]; |
@@ -183,7 +194,9 @@ discard block |
||
183 | 194 | if($modx->hasPermission('settings')) { |
184 | 195 | $warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>'; |
185 | 196 | } |
186 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1]." ".join(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']); |
|
197 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
198 | + $modx->logEvent(0,3,$warnings[$i][1]." ".join(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']); |
|
199 | + } |
|
187 | 200 | break; |
188 | 201 | case $_lang['configcheck_lang_difference'] : |
189 | 202 | $warnings[$i][1] = $_lang['configcheck_lang_difference_msg']; |
@@ -3,7 +3,7 @@ discard block |
||
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 | |
6 | -if($modx->manager->action!='8' && isset($_SESSION['mgrValidated'])){ |
|
6 | +if($modx->manager->action!='8' && isset($_SESSION['mgrValidated'])) { |
|
7 | 7 | |
8 | 8 | $homeurl = $modx->makeUrl($manager_login_startup>0 ? $manager_login_startup:$site_start); |
9 | 9 | $logouturl = MODX_MANAGER_URL.'index.php?a=8'; |
@@ -35,8 +35,7 @@ discard block |
||
35 | 35 | if(substr($target,0,6)==='@CHUNK') { |
36 | 36 | $target = trim(substr($target,7)); |
37 | 37 | $lockout_tpl = $modx->getChunk($target); |
38 | - } |
|
39 | - elseif(substr($target,0,5)==='@FILE') { |
|
38 | + } elseif(substr($target,0,5)==='@FILE') { |
|
40 | 39 | $target = trim(substr($target,6)); |
41 | 40 | $lockout_tpl = file_get_contents($target); |
42 | 41 | } |
@@ -44,24 +43,20 @@ discard block |
||
44 | 43 | $chunk = $modx->getChunk($target); |
45 | 44 | if($chunk!==false && !empty($chunk)) { |
46 | 45 | $lockout_tpl = $chunk; |
47 | - } |
|
48 | - elseif(is_file(MODX_BASE_PATH . $target)) { |
|
46 | + } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
49 | 47 | $target = MODX_BASE_PATH . $target; |
50 | 48 | $lockout_tpl = file_get_contents($target); |
51 | - } |
|
52 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) { |
|
49 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) { |
|
53 | 50 | $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl'; |
54 | 51 | $lockout_tpl = file_get_contents($target); |
55 | - } |
|
56 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) { |
|
52 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) { |
|
57 | 53 | $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl'; |
58 | 54 | $login_tpl = file_get_contents($target); |
59 | - } |
|
60 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible |
|
55 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { |
|
56 | +// ClipperCMS compatible |
|
61 | 57 | $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html'; |
62 | 58 | $lockout_tpl = file_get_contents($target); |
63 | - } |
|
64 | - else { |
|
59 | + } else { |
|
65 | 60 | $target = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl'; |
66 | 61 | $lockout_tpl = file_get_contents($target); |
67 | 62 | } |
@@ -5,8 +5,9 @@ discard block |
||
5 | 5 | |
6 | 6 | // get the settings from the database. |
7 | 7 | $settings = array(); |
8 | -if ($modx && count($modx->config)>0) $settings = $modx->config; |
|
9 | -else{ |
|
8 | +if ($modx && count($modx->config)>0) { |
|
9 | + $settings = $modx->config; |
|
10 | +} else { |
|
10 | 11 | $rs = $modx->db->select('setting_name, setting_value', $modx->getFullTableName('system_settings')); |
11 | 12 | while ($row = $modx->db->getRow($rs)) { |
12 | 13 | $settings[$row['setting_name']] = $row['setting_value']; |
@@ -16,4 +17,6 @@ discard block |
||
16 | 17 | extract($settings, EXTR_OVERWRITE); |
17 | 18 | |
18 | 19 | // setup default site id - new installation should generate a unique id for the site. |
19 | -if(!isset($site_id)) $site_id = "MzGeQ2faT4Dw06+U49x3"; |
|
20 | +if(!isset($site_id)) { |
|
21 | + $site_id = "MzGeQ2faT4Dw06+U49x3"; |
|
22 | +} |
@@ -12,7 +12,8 @@ |
||
12 | 12 | * |
13 | 13 | */ |
14 | 14 | |
15 | -function secureMgrDocument($docid='') { |
|
15 | +function secureMgrDocument($docid='') |
|
16 | +{ |
|
16 | 17 | global $modx; |
17 | 18 | |
18 | 19 | $modx->db->update('privatemgr = 0', $modx->getFullTableName("site_content"), ($docid>0 ? "id='$docid'":"privatemgr = 1")); |
@@ -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 | $mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en'; |
@@ -9,21 +9,21 @@ discard block |
||
9 | 9 | $modx_textdir = isset($modx_textdir) ? $modx_textdir : null; |
10 | 10 | $onManagerMainFrameHeaderHTMLBlock = is_array($evtOut) ? implode("\n", $evtOut) : ''; |
11 | 11 | $textdir = $modx_textdir === 'rtl' ? 'rtl' : 'ltr'; |
12 | -if (!isset($modx->config['mgr_jquery_path'])) { |
|
12 | +if (!isset($modx->config['mgr_jquery_path'])) { |
|
13 | 13 | $modx->config['mgr_jquery_path'] = 'media/script/jquery/jquery.min.js'; |
14 | 14 | } |
15 | -if (!isset($modx->config['mgr_date_picker_path'])) { |
|
15 | +if (!isset($modx->config['mgr_date_picker_path'])) { |
|
16 | 16 | $modx->config['mgr_date_picker_path'] = 'media/script/air-datepicker/datepicker.inc.php'; |
17 | 17 | } |
18 | 18 | |
19 | -if (!empty($_COOKIE['MODX_themeColor'])) { |
|
19 | +if (!empty($_COOKIE['MODX_themeColor'])) { |
|
20 | 20 | $body_class .= ' ' . $_COOKIE['MODX_themeColor']; |
21 | 21 | } |
22 | 22 | |
23 | 23 | $css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime; |
24 | 24 | |
25 | -if ($modx->config['manager_theme'] == 'default') { |
|
26 | - 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')) { |
|
25 | +if ($modx->config['manager_theme'] == 'default') { |
|
26 | + 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')) { |
|
27 | 27 | require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
28 | 28 | $minifier = new Formatter\CSSMinify(); |
29 | 29 | $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $css = $minifier->minify(); |
41 | 41 | file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
42 | 42 | } |
43 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
43 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
44 | 44 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
45 | 45 | } |
46 | 46 | } |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | stopWorker(); |
364 | 364 | |
365 | 365 | <?php |
366 | - if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) { |
|
366 | + if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) { |
|
367 | 367 | echo 'doRefresh(' . $_REQUEST['r'] . ");\n"; |
368 | 368 | } |
369 | 369 | ?> |
@@ -12,7 +12,8 @@ |
||
12 | 12 | * |
13 | 13 | */ |
14 | 14 | |
15 | -function secureWebDocument($docid='') { |
|
15 | +function secureWebDocument($docid='') |
|
16 | +{ |
|
16 | 17 | global $modx; |
17 | 18 | |
18 | 19 | $modx->db->update('privateweb = 0', $modx->getFullTableName("site_content"), ($docid>0 ? "id='$docid'":"privateweb = 1")); |