@@ -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 | -if(!$modx->hasPermission('delete_plugin')) { |
|
| 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); |
@@ -3,12 +3,12 @@ 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 | if(!$modx->hasPermission('delete_plugin')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforePluginFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforePluginFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the plugin. |
| 25 | 25 | $modx->getDatabase()->delete($modx->getDatabase()->getFullTableName('site_plugins'), "id='{$id}'"); |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // invoke OnPluginFormDelete event |
| 31 | 31 | $modx->invokeEvent("OnPluginFormDelete", |
| 32 | - array( |
|
| 33 | - "id" => $id |
|
| 34 | - )); |
|
| 32 | + array( |
|
| 33 | + "id" => $id |
|
| 34 | + )); |
|
| 35 | 35 | |
| 36 | 36 | // empty cache |
| 37 | 37 | $modx->clearCache('full'); |
@@ -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 | -if(!$modx->hasPermission('delete_snippet')) { |
|
| 5 | +if (!$modx->hasPermission('delete_snippet')) { |
|
| 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 | |
@@ -34,5 +34,5 @@ discard block |
||
| 34 | 34 | $modx->clearCache('full'); |
| 35 | 35 | |
| 36 | 36 | // finished emptying cache - redirect |
| 37 | -$header="Location: index.php?a=76&r=2"; |
|
| 37 | +$header = "Location: index.php?a=76&r=2"; |
|
| 38 | 38 | header($header); |
@@ -3,12 +3,12 @@ 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 | if(!$modx->hasPermission('delete_snippet')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,18 +17,18 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeChunkFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeChunkFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the chunk. |
| 25 | 25 | $modx->getDatabase()->delete($modx->getDatabase()->getFullTableName('site_htmlsnippets'), "id='{$id}'"); |
| 26 | 26 | |
| 27 | 27 | // invoke OnChunkFormDelete event |
| 28 | 28 | $modx->invokeEvent("OnChunkFormDelete", |
| 29 | - array( |
|
| 30 | - "id" => $id |
|
| 31 | - )); |
|
| 29 | + array( |
|
| 30 | + "id" => $id |
|
| 31 | + )); |
|
| 32 | 32 | |
| 33 | 33 | // empty cache |
| 34 | 34 | $modx->clearCache('full'); |
@@ -1,8 +1,8 @@ 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 | -if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) { |
|
| 5 | +if (!($modx->hasPermission('settings') && ($modx->hasPermission('logs') || $modx->hasPermission('bk_manager')))) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -32,6 +32,6 @@ discard block |
||
| 32 | 32 | $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -$mode = (int)$_REQUEST['mode']; |
|
| 36 | -$header="Location: index.php?a={$mode}&s=4"; |
|
| 35 | +$mode = (int) $_REQUEST['mode']; |
|
| 36 | +$header = "Location: index.php?a={$mode}&s=4"; |
|
| 37 | 37 | header($header); |
@@ -3,33 +3,33 @@ |
||
| 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') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | if (isset($_REQUEST['t'])) { |
| 10 | 10 | |
| 11 | - if (empty($_REQUEST['t'])) { |
|
| 12 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 13 | - } |
|
| 11 | + if (empty($_REQUEST['t'])) { |
|
| 12 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | - // Set the item name for logger |
|
| 16 | - $_SESSION['itemname'] = $_REQUEST['t']; |
|
| 15 | + // Set the item name for logger |
|
| 16 | + $_SESSION['itemname'] = $_REQUEST['t']; |
|
| 17 | 17 | |
| 18 | - $modx->getDatabase()->optimize($_REQUEST['t']); |
|
| 18 | + $modx->getDatabase()->optimize($_REQUEST['t']); |
|
| 19 | 19 | |
| 20 | 20 | } elseif (isset($_REQUEST['u'])) { |
| 21 | 21 | |
| 22 | - if (empty($_REQUEST['u'])) { |
|
| 23 | - $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
| 24 | - } |
|
| 22 | + if (empty($_REQUEST['u'])) { |
|
| 23 | + $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - // Set the item name for logger |
|
| 27 | - $_SESSION['itemname'] = $_REQUEST['u']; |
|
| 26 | + // Set the item name for logger |
|
| 27 | + $_SESSION['itemname'] = $_REQUEST['u']; |
|
| 28 | 28 | |
| 29 | - $modx->getDatabase()->truncate($_REQUEST['u']); |
|
| 29 | + $modx->getDatabase()->truncate($_REQUEST['u']); |
|
| 30 | 30 | |
| 31 | 31 | } else { |
| 32 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 32 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | $mode = (int)$_REQUEST['mode']; |
@@ -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 | -if(!$modx->hasPermission('delete_web_user')) { |
|
| 5 | +if (!$modx->hasPermission('delete_web_user')) { |
|
| 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 | |
@@ -43,5 +43,5 @@ discard block |
||
| 43 | 43 | "id" => $id |
| 44 | 44 | )); |
| 45 | 45 | |
| 46 | -$header="Location: index.php?a=99"; |
|
| 46 | +$header = "Location: index.php?a=99"; |
|
| 47 | 47 | header($header); |
@@ -3,12 +3,12 @@ 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 | if(!$modx->hasPermission('delete_web_user')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeWUsrFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeWUsrFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the user. |
| 25 | 25 | $modx->getDatabase()->delete($modx->getDatabase()->getFullTableName('web_users'), "id='{$id}'"); |
@@ -32,16 +32,16 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | // invoke OnWebDeleteUser event |
| 34 | 34 | $modx->invokeEvent("OnWebDeleteUser", |
| 35 | - array( |
|
| 36 | - "userid" => $id, |
|
| 37 | - "username" => $username |
|
| 38 | - )); |
|
| 35 | + array( |
|
| 36 | + "userid" => $id, |
|
| 37 | + "username" => $username |
|
| 38 | + )); |
|
| 39 | 39 | |
| 40 | 40 | // invoke OnWUsrFormDelete event |
| 41 | 41 | $modx->invokeEvent("OnWUsrFormDelete", |
| 42 | - array( |
|
| 43 | - "id" => $id |
|
| 44 | - )); |
|
| 42 | + array( |
|
| 43 | + "id" => $id |
|
| 44 | + )); |
|
| 45 | 45 | |
| 46 | 46 | $header="Location: index.php?a=99"; |
| 47 | 47 | header($header); |
@@ -3,17 +3,17 @@ |
||
| 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_eventlog')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | if (isset($_GET['cls']) && $_GET['cls']==1) { |
| 10 | - $where = ''; |
|
| 10 | + $where = ''; |
|
| 11 | 11 | } else { |
| 12 | - $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
| 13 | - if($id==0) { |
|
| 14 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 15 | - } |
|
| 16 | - $where = "id='{$id}'"; |
|
| 12 | + $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
| 13 | + if($id==0) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 15 | + } |
|
| 16 | + $where = "id='{$id}'"; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | // delete event log |
@@ -1,16 +1,16 @@ 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 | -if(!$modx->hasPermission('delete_eventlog')) { |
|
| 5 | +if (!$modx->hasPermission('delete_eventlog')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -if (isset($_GET['cls']) && $_GET['cls']==1) { |
|
| 9 | +if (isset($_GET['cls']) && $_GET['cls'] == 1) { |
|
| 10 | 10 | $where = ''; |
| 11 | 11 | } else { |
| 12 | - $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
| 13 | - if($id==0) { |
|
| 12 | + $id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
| 13 | + if ($id == 0) { |
|
| 14 | 14 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 15 | 15 | } |
| 16 | 16 | $where = "id='{$id}'"; |
@@ -19,5 +19,5 @@ discard block |
||
| 19 | 19 | // delete event log |
| 20 | 20 | $modx->getDatabase()->delete($modx->getDatabase()->getFullTableName('event_log'), $where); |
| 21 | 21 | |
| 22 | -$header="Location: index.php?a=114"; |
|
| 22 | +$header = "Location: index.php?a=114"; |
|
| 23 | 23 | 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('save_plugin') && !$modx->hasPermission('save_snippet') && !$modx->hasPermission('save_template') && !$modx->hasPermission('save_module')) { |
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = isset($_GET['catId'])? (int)$_GET['catId'] : 0; |
|
| 10 | -if ($id==0) { |
|
| 9 | +$id = isset($_GET['catId']) ? (int) $_GET['catId'] : 0; |
|
| 10 | +if ($id == 0) { |
|
| 11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 12 | 12 | } |
| 13 | 13 | |
@@ -19,5 +19,5 @@ discard block |
||
| 19 | 19 | deleteCategory($id); |
| 20 | 20 | |
| 21 | 21 | // finished emptying cache - redirect |
| 22 | -$header="Location: index.php?a=76"; |
|
| 22 | +$header = "Location: index.php?a=76"; |
|
| 23 | 23 | header($header); |
@@ -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 | -if(!$modx->hasPermission('delete_user')) { |
|
| 5 | +if (!$modx->hasPermission('delete_user')) { |
|
| 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 | |
| 14 | 14 | // delete the user, but first check if we are deleting our own record |
| 15 | -if($id==$modx->getLoginUserID()) { |
|
| 15 | +if ($id == $modx->getLoginUserID()) { |
|
| 16 | 16 | $modx->webAlertAndQuit("You can't delete yourself!"); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -50,5 +50,5 @@ discard block |
||
| 50 | 50 | "id" => $id |
| 51 | 51 | )); |
| 52 | 52 | |
| 53 | -$header="Location: index.php?a=75"; |
|
| 53 | +$header = "Location: index.php?a=75"; |
|
| 54 | 54 | header($header); |
@@ -3,17 +3,17 @@ 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 | if(!$modx->hasPermission('delete_user')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // delete the user, but first check if we are deleting our own record |
| 15 | 15 | if($id==$modx->getLoginUserID()) { |
| 16 | - $modx->webAlertAndQuit("You can't delete yourself!"); |
|
| 16 | + $modx->webAlertAndQuit("You can't delete yourself!"); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | // Set the item name for logger |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | // invoke OnBeforeUserFormDelete event |
| 24 | 24 | $modx->invokeEvent("OnBeforeUserFormDelete", |
| 25 | - array( |
|
| 26 | - "id" => $id |
|
| 27 | - )); |
|
| 25 | + array( |
|
| 26 | + "id" => $id |
|
| 27 | + )); |
|
| 28 | 28 | |
| 29 | 29 | // delete the user. |
| 30 | 30 | $modx->getDatabase()->delete($modx->getDatabase()->getFullTableName('manager_users'), "id='{$id}'"); |
@@ -39,16 +39,16 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // invoke OnManagerDeleteUser event |
| 41 | 41 | $modx->invokeEvent("OnManagerDeleteUser", |
| 42 | - array( |
|
| 43 | - "userid" => $id, |
|
| 44 | - "username" => $username |
|
| 45 | - )); |
|
| 42 | + array( |
|
| 43 | + "userid" => $id, |
|
| 44 | + "username" => $username |
|
| 45 | + )); |
|
| 46 | 46 | |
| 47 | 47 | // invoke OnUserFormDelete event |
| 48 | 48 | $modx->invokeEvent("OnUserFormDelete", |
| 49 | - array( |
|
| 50 | - "id" => $id |
|
| 51 | - )); |
|
| 49 | + array( |
|
| 50 | + "id" => $id |
|
| 51 | + )); |
|
| 52 | 52 | |
| 53 | 53 | $header="Location: index.php?a=75"; |
| 54 | 54 | 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 | -if(!$modx->hasPermission('delete_module')) { |
|
| 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); |
@@ -3,12 +3,12 @@ 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 | if(!$modx->hasPermission('delete_module')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeModFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeModFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the module. |
| 25 | 25 | $modx->getDatabase()->delete($modx->getDatabase()->getFullTableName('site_modules'), "id='{$id}'"); |
@@ -32,9 +32,9 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | // invoke OnModFormDelete event |
| 34 | 34 | $modx->invokeEvent("OnModFormDelete", |
| 35 | - array( |
|
| 36 | - "id" => $id |
|
| 37 | - )); |
|
| 35 | + array( |
|
| 36 | + "id" => $id |
|
| 37 | + )); |
|
| 38 | 38 | |
| 39 | 39 | // empty cache |
| 40 | 40 | $modx->clearCache('full'); |
@@ -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 | -if(!$modx->hasPermission('delete_snippet')) { |
|
| 5 | +if (!$modx->hasPermission('delete_snippet')) { |
|
| 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 | |
@@ -34,5 +34,5 @@ discard block |
||
| 34 | 34 | $modx->clearCache('full'); |
| 35 | 35 | |
| 36 | 36 | // finished emptying cache - redirect |
| 37 | -$header="Location: index.php?a=76&r=2"; |
|
| 37 | +$header = "Location: index.php?a=76&r=2"; |
|
| 38 | 38 | header($header); |
@@ -3,12 +3,12 @@ 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 | if(!$modx->hasPermission('delete_snippet')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,18 +17,18 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeSnipFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeSnipFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the snippet. |
| 25 | 25 | $modx->getDatabase()->delete($modx->getDatabase()->getFullTableName('site_snippets'), "id='{$id}'"); |
| 26 | 26 | |
| 27 | 27 | // invoke OnSnipFormDelete event |
| 28 | 28 | $modx->invokeEvent("OnSnipFormDelete", |
| 29 | - array( |
|
| 30 | - "id" => $id |
|
| 31 | - )); |
|
| 29 | + array( |
|
| 30 | + "id" => $id |
|
| 31 | + )); |
|
| 32 | 32 | |
| 33 | 33 | // empty cache |
| 34 | 34 | $modx->clearCache('full'); |