@@ -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 | if (!$modx->hasPermission('save_web_user')) { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $input[$k] = $v; |
19 | 19 | } |
20 | 20 | |
21 | -$id = (int)$input['id']; |
|
21 | +$id = (int) $input['id']; |
|
22 | 22 | $oldusername = $input['oldusername']; |
23 | 23 | $newusername = !empty($input['newusername']) ? trim($input['newusername']) : "New User"; |
24 | 24 | $esc_newusername = $modx->db->escape($newusername); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | if (!empty($user_groups)) { |
121 | 121 | for ($i = 0; $i < count($user_groups); $i++) { |
122 | 122 | $f = array(); |
123 | - $f['webgroup'] = (int)$user_groups[$i]; |
|
123 | + $f['webgroup'] = (int) $user_groups[$i]; |
|
124 | 124 | $f['webuser'] = $internalKey; |
125 | 125 | $modx->db->insert($f, $tbl_web_groups); |
126 | 126 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | sendMailMessage($email, $newusername, $newpassword, $fullname); |
149 | 149 | if ($input['stay'] != '') { |
150 | 150 | $a = ($input['stay'] == '2') ? "88&id={$internalKey}" : "87"; |
151 | - $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
151 | + $header = "Location: index.php?a={$a}&r=2&stay=".$input['stay']; |
|
152 | 152 | header($header); |
153 | 153 | } else { |
154 | 154 | $header = "Location: index.php?a=99&r=2"; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } else { |
158 | 158 | if ($input['stay'] != '') { |
159 | 159 | $a = ($input['stay'] == '2') ? "88&id={$internalKey}" : "87"; |
160 | - $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
160 | + $stayUrl = "index.php?a={$a}&r=2&stay=".$input['stay']; |
|
161 | 161 | } else { |
162 | 162 | $stayUrl = "index.php?a=99&r=2"; |
163 | 163 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | if (!empty($user_groups)) { |
257 | 257 | for ($i = 0; $i < count($user_groups); $i++) { |
258 | 258 | $field = array(); |
259 | - $field['webgroup'] = (int)$user_groups[$i]; |
|
259 | + $field['webgroup'] = (int) $user_groups[$i]; |
|
260 | 260 | $field['webuser'] = $id; |
261 | 261 | $modx->db->insert($field, $tbl_web_groups); |
262 | 262 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | if ($genpassword == 1 && $passwordnotifymethod == 's') { |
296 | 296 | if ($input['stay'] != '') { |
297 | 297 | $a = ($input['stay'] == '2') ? "88&id={$id}" : "87"; |
298 | - $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
298 | + $stayUrl = "index.php?a={$a}&r=2&stay=".$input['stay']; |
|
299 | 299 | } else { |
300 | 300 | $stayUrl = "index.php?a=99&r=2"; |
301 | 301 | } |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | } else { |
325 | 325 | if ($input['stay'] != '') { |
326 | 326 | $a = ($input['stay'] == '2') ? "88&id={$id}" : "87"; |
327 | - $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
327 | + $header = "Location: index.php?a={$a}&r=2&stay=".$input['stay']; |
|
328 | 328 | header($header); |
329 | 329 | } else { |
330 | 330 | $header = "Location: index.php?a=99&r=2"; |
@@ -345,13 +345,13 @@ discard block |
||
345 | 345 | function save_user_quoted_printable($string) |
346 | 346 | { |
347 | 347 | $crlf = "\n"; |
348 | - $string = preg_replace('!(\r\n|\r|\n)!', $crlf, $string) . $crlf; |
|
348 | + $string = preg_replace('!(\r\n|\r|\n)!', $crlf, $string).$crlf; |
|
349 | 349 | $f[] = '/([\000-\010\013\014\016-\037\075\177-\377])/e'; |
350 | 350 | $r[] = "'=' . sprintf('%02X', ord('\\1'))"; |
351 | - $f[] = '/([\011\040])' . $crlf . '/e'; |
|
352 | - $r[] = "'=' . sprintf('%02X', ord('\\1')) . '" . $crlf . "'"; |
|
351 | + $f[] = '/([\011\040])'.$crlf.'/e'; |
|
352 | + $r[] = "'=' . sprintf('%02X', ord('\\1')) . '".$crlf."'"; |
|
353 | 353 | $string = preg_replace($f, $r, $string); |
354 | - return trim(wordwrap($string, 70, ' =' . $crlf)); |
|
354 | + return trim(wordwrap($string, 70, ' ='.$crlf)); |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | /** |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | global $id, $modx; |
428 | 428 | $mode = $_POST['mode']; |
429 | 429 | $modx->manager->saveFormValues($mode); |
430 | - $modx->webAlertAndQuit($msg, "index.php?a={$mode}" . ($mode == '88' ? "&id={$id}" : '')); |
|
430 | + $modx->webAlertAndQuit($msg, "index.php?a={$mode}".($mode == '88' ? "&id={$id}" : '')); |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | // Generate password |
@@ -1,18 +1,18 @@ 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 | if (!$modx->hasPermission('edit_document')) { |
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$newParentID = isset($_REQUEST['new_parent']) ? (int)$_REQUEST['new_parent'] : 0; |
|
10 | -$documentID = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
9 | +$newParentID = isset($_REQUEST['new_parent']) ? (int) $_REQUEST['new_parent'] : 0; |
|
10 | +$documentID = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
11 | 11 | |
12 | 12 | // ok, two things to check. |
13 | 13 | // first, document cannot be moved to itself |
14 | 14 | // second, new parent must be a folder. If not, set it to folder. |
15 | -if ($documentID==$newParentID) { |
|
15 | +if ($documentID == $newParentID) { |
|
16 | 16 | $modx->webAlertAndQuit($_lang["error_movedocument1"]); |
17 | 17 | } |
18 | 18 | if ($documentID <= 0) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | if ($use_udperms == 1) { |
36 | 36 | if ($oldparent != $newParentID) { |
37 | - include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php"; |
|
37 | + include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php"; |
|
38 | 38 | $udperms = new udperms(); |
39 | 39 | $udperms->user = $modx->getLoginUserID(); |
40 | 40 | $udperms->document = $newParentID; |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | function allChildren($currDocID) |
54 | 54 | { |
55 | 55 | $modx = evolutionCMS(); |
56 | - $children= array(); |
|
56 | + $children = array(); |
|
57 | 57 | $currDocID = $modx->db->escape($currDocID); |
58 | 58 | $rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "parent = '{$currDocID}'"); |
59 | - while ($child= $modx->db->getRow($rs)) { |
|
60 | - $children[]= $child['id']; |
|
61 | - $children= array_merge($children, allChildren($child['id'])); |
|
59 | + while ($child = $modx->db->getRow($rs)) { |
|
60 | + $children[] = $child['id']; |
|
61 | + $children = array_merge($children, allChildren($child['id'])); |
|
62 | 62 | } |
63 | 63 | return $children; |
64 | 64 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_content'), "parent='{$oldparent}'"); |
94 | 94 | $limit = $modx->db->getValue($rs); |
95 | 95 | |
96 | - if (!$limit>0) { |
|
96 | + if (!$limit > 0) { |
|
97 | 97 | $modx->db->update(array( |
98 | 98 | 'isfolder' => 0, |
99 | 99 | ), $modx->getFullTableName('site_content'), "id='{$oldparent}'"); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | // empty cache & sync site |
112 | 112 | $modx->clearCache('full'); |
113 | 113 | |
114 | - $header="Location: index.php?a=3&id={$documentID}&r=9"; |
|
114 | + $header = "Location: index.php?a=3&id={$documentID}&r=9"; |
|
115 | 115 | header($header); |
116 | 116 | } else { |
117 | 117 | $modx->webAlertAndQuit("You cannot move a document to a child document!"); |
@@ -1,13 +1,13 @@ 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 | if (!$modx->hasPermission('messages')) { |
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
10 | -if ($id==0) { |
|
9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit("Wrong number of messages returned!"); |
19 | 19 | } |
20 | 20 | |
21 | -if ($message['recipient']!=$modx->getLoginUserID()) { |
|
21 | +if ($message['recipient'] != $modx->getLoginUserID()) { |
|
22 | 22 | $modx->webAlertAndQuit("You are not allowed to delete this message!"); |
23 | 23 | } |
24 | 24 | |
25 | 25 | // delete message |
26 | 26 | $modx->db->delete($modx->getFullTableName('user_messages'), "id='{$id}'"); |
27 | 27 | |
28 | -$header="Location: index.php?a=10"; |
|
28 | +$header = "Location: index.php?a=10"; |
|
29 | 29 | header($header); |
@@ -1,12 +1,12 @@ 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 | if (!$modx->hasPermission('save_template')) { |
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = (int)$_POST['id']; |
|
9 | +$id = (int) $_POST['id']; |
|
10 | 10 | $name = $modx->db->escape(trim($_POST['name'])); |
11 | 11 | $description = $modx->db->escape($_POST['description']); |
12 | 12 | $caption = $modx->db->escape($_POST['caption']); |
@@ -17,17 +17,17 @@ discard block |
||
17 | 17 | $display = $modx->db->escape($_POST['display']); |
18 | 18 | $params = $modx->db->escape($_POST['params']); |
19 | 19 | $locked = $_POST['locked'] == 'on' ? 1 : 0; |
20 | -$origin = isset($_REQUEST['or']) ? (int)$_REQUEST['or'] : 76; |
|
21 | -$originId = isset($_REQUEST['oid']) ? (int)$_REQUEST['oid'] : null; |
|
20 | +$origin = isset($_REQUEST['or']) ? (int) $_REQUEST['or'] : 76; |
|
21 | +$originId = isset($_REQUEST['oid']) ? (int) $_REQUEST['oid'] : null; |
|
22 | 22 | $currentdate = time() + $modx->config['server_offset_time']; |
23 | 23 | |
24 | 24 | //Kyle Jaebker - added category support |
25 | 25 | if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) { |
26 | - $categoryid = (int)$_POST['categoryid']; |
|
26 | + $categoryid = (int) $_POST['categoryid']; |
|
27 | 27 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
28 | 28 | $categoryid = 0; |
29 | 29 | } else { |
30 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
30 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
31 | 31 | $categoryid = checkCategory($_POST['newcategory']); |
32 | 32 | if (!$categoryid) { |
33 | 33 | $categoryid = newCategory($_POST['newcategory']); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | // finished emptying cache - redirect |
100 | 100 | if ($_POST['stay'] != '') { |
101 | 101 | $a = ($_POST['stay'] == '2') ? "301&id=$newid" : "300"; |
102 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
102 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
103 | 103 | header($header); |
104 | 104 | } else { |
105 | 105 | $header = "Location: index.php?a=76&r=2"; |
@@ -160,11 +160,11 @@ discard block |
||
160 | 160 | // finished emptying cache - redirect |
161 | 161 | if ($_POST['stay'] != '') { |
162 | 162 | $a = ($_POST['stay'] == '2') ? "301&id=$id" : "300"; |
163 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'] . "&or=" . $origin . "&oid=" . $originId; |
|
163 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']."&or=".$origin."&oid=".$originId; |
|
164 | 164 | header($header); |
165 | 165 | } else { |
166 | 166 | $modx->unlockElement(2, $id); |
167 | - $header = "Location: index.php?a=" . $origin . "&r=2" . (empty($originId) ? '' : '&id=' . $originId); |
|
167 | + $header = "Location: index.php?a=".$origin."&r=2".(empty($originId) ? '' : '&id='.$originId); |
|
168 | 168 | header($header); |
169 | 169 | } |
170 | 170 |
@@ -3,16 +3,16 @@ discard block |
||
3 | 3 | header('HTTP/1.0 404 Not Found'); |
4 | 4 | exit('error'); |
5 | 5 | } |
6 | -define('IN_MANAGER_MODE', true); // we use this to make sure files are accessed through |
|
6 | +define('IN_MANAGER_MODE', true); // we use this to make sure files are accessed through |
|
7 | 7 | define('MODX_API_MODE', true); |
8 | -include_once(__DIR__ . '/../../index.php'); |
|
8 | +include_once(__DIR__.'/../../index.php'); |
|
9 | 9 | $modx->db->connect(); |
10 | 10 | $modx->getSettings(); |
11 | 11 | $modx->invokeEvent('OnManagerPageInit'); |
12 | 12 | $modx->loadExtension('ManagerAPI'); |
13 | 13 | $modx->loadExtension('phpass'); |
14 | 14 | |
15 | -$core_path = MODX_MANAGER_PATH . 'includes/'; |
|
15 | +$core_path = MODX_MANAGER_PATH.'includes/'; |
|
16 | 16 | // include_once the language file |
17 | 17 | $_lang = array(); |
18 | 18 | include_once("{$core_path}lang/english.inc.php"); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $ip = "UNKNOWN"; |
93 | 93 | } |
94 | 94 | $log = new logHandler; |
95 | - $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip); |
|
95 | + $log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: ".$ip); |
|
96 | 96 | jsAlert($_lang['login_processor_many_failed_logins']); |
97 | 97 | return; |
98 | 98 | } |
@@ -218,18 +218,18 @@ discard block |
||
218 | 218 | $_SESSION['mgrPermissions'] = $modx->db->getRow($rs); |
219 | 219 | |
220 | 220 | // successful login so reset fail count and update key values |
221 | -$modx->db->update('failedlogincount=0, ' . 'logincount=logincount+1, ' . 'lastlogin=thislogin, ' . 'thislogin=' . time() . ', ' . "sessionid='{$currentsessionid}'", '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
221 | +$modx->db->update('failedlogincount=0, '.'logincount=logincount+1, '.'lastlogin=thislogin, '.'thislogin='.time().', '."sessionid='{$currentsessionid}'", '[+prefix+]user_attributes', "internalKey='{$internalKey}'"); |
|
222 | 222 | |
223 | 223 | // get user's document groups |
224 | 224 | $i = 0; |
225 | -$rs = $modx->db->select('uga.documentgroup', $modx->getFullTableName('member_groups') . ' ug |
|
226 | - INNER JOIN ' . $modx->getFullTableName('membergroup_access') . ' uga ON uga.membergroup=ug.user_group', "ug.member='{$internalKey}'"); |
|
225 | +$rs = $modx->db->select('uga.documentgroup', $modx->getFullTableName('member_groups').' ug |
|
226 | + INNER JOIN ' . $modx->getFullTableName('membergroup_access').' uga ON uga.membergroup=ug.user_group', "ug.member='{$internalKey}'"); |
|
227 | 227 | $_SESSION['mgrDocgroups'] = $modx->db->getColumn('documentgroup', $rs); |
228 | 228 | |
229 | 229 | $_SESSION['mgrToken'] = md5($currentsessionid); |
230 | 230 | |
231 | 231 | if ($rememberme == '1') { |
232 | - $_SESSION['modx.mgr.session.cookie.lifetime'] = (int)$modx->config['session.cookie.lifetime']; |
|
232 | + $_SESSION['modx.mgr.session.cookie.lifetime'] = (int) $modx->config['session.cookie.lifetime']; |
|
233 | 233 | |
234 | 234 | // Set a cookie separate from the session cookie with the username in it. |
235 | 235 | // Are we using secure connection? If so, make sure the cookie is secure |
@@ -274,16 +274,16 @@ discard block |
||
274 | 274 | |
275 | 275 | // check if we should redirect user to a web page |
276 | 276 | $rs = $modx->db->select('setting_value', '[+prefix+]user_settings', "user='{$internalKey}' AND setting_name='manager_login_startup'"); |
277 | -$id = (int)$modx->db->getValue($rs); |
|
277 | +$id = (int) $modx->db->getValue($rs); |
|
278 | 278 | if ($id > 0) { |
279 | - $header = 'Location: ' . $modx->makeUrl($id, '', '', 'full'); |
|
279 | + $header = 'Location: '.$modx->makeUrl($id, '', '', 'full'); |
|
280 | 280 | if ($_POST['ajax'] == 1) { |
281 | 281 | echo $header; |
282 | 282 | } else { |
283 | 283 | header($header); |
284 | 284 | } |
285 | 285 | } else { |
286 | - $header = 'Location: ' . MODX_MANAGER_URL; |
|
286 | + $header = 'Location: '.MODX_MANAGER_URL; |
|
287 | 287 | if ($_POST['ajax'] == 1) { |
288 | 288 | echo $header; |
289 | 289 | } else { |
@@ -300,9 +300,9 @@ discard block |
||
300 | 300 | { |
301 | 301 | $modx = evolutionCMS(); |
302 | 302 | if ($_POST['ajax'] != 1) { |
303 | - echo "<script>window.setTimeout(\"alert('" . addslashes($modx->db->escape($msg)) . "')\",10);history.go(-1)</script>"; |
|
303 | + echo "<script>window.setTimeout(\"alert('".addslashes($modx->db->escape($msg))."')\",10);history.go(-1)</script>"; |
|
304 | 304 | } else { |
305 | - echo $msg . "\n"; |
|
305 | + echo $msg."\n"; |
|
306 | 306 | } |
307 | 307 | } |
308 | 308 |
@@ -1,5 +1,5 @@ |
||
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 | exit(); |
4 | 4 | } |
5 | 5 |
@@ -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 | if (!$modx->hasPermission('settings')) { |
@@ -8,5 +8,5 @@ discard block |
||
8 | 8 | |
9 | 9 | $modx->db->truncate($modx->getFullTableName('manager_log')); |
10 | 10 | |
11 | -$header="Location: index.php?a=13"; |
|
11 | +$header = "Location: index.php?a=13"; |
|
12 | 12 | header($header); |
@@ -1,13 +1,13 @@ 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 | if (!$modx->hasPermission('delete_plugin')) { |
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
10 | -if ($id==0) { |
|
9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
@@ -37,5 +37,5 @@ discard block |
||
37 | 37 | $modx->clearCache('full'); |
38 | 38 | |
39 | 39 | // finished emptying cache - redirect |
40 | -$header="Location: index.php?a=76&r=2"; |
|
40 | +$header = "Location: index.php?a=76&r=2"; |
|
41 | 41 | header($header); |
@@ -1,13 +1,13 @@ 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 | if (!$modx->hasPermission('delete_module')) { |
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
10 | -if ($id==0) { |
|
9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
@@ -40,5 +40,5 @@ discard block |
||
40 | 40 | $modx->clearCache('full'); |
41 | 41 | |
42 | 42 | // finished emptying cache - redirect |
43 | -$header="Location: index.php?a=106&r=2"; |
|
43 | +$header = "Location: index.php?a=106&r=2"; |
|
44 | 44 | header($header); |