@@ -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'])? intval($_GET['id']) : 0; |
|
| 10 | -if($id==0) { |
|
| 9 | +$id = isset($_GET['id']) ? intval($_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); |
@@ -1,20 +1,20 @@ 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('new_plugin')) { |
|
| 5 | +if (!$modx->hasPermission('new_plugin')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = isset($_GET['id'])? intval($_GET['id']) : 0; |
|
| 10 | -if($id==0) { |
|
| 9 | +$id = isset($_GET['id']) ? intval($_GET['id']) : 0; |
|
| 10 | +if ($id == 0) { |
|
| 11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // count duplicates |
| 15 | 15 | $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_plugins'), "id='{$id}'")); |
| 16 | 16 | $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_plugins'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'")); |
| 17 | -if($count>=1) $count = ' '.($count+1); |
|
| 17 | +if ($count >= 1) $count = ' '.($count + 1); |
|
| 18 | 18 | else $count = ''; |
| 19 | 19 | |
| 20 | 20 | // duplicate Plugin |
@@ -44,5 +44,5 @@ discard block |
||
| 44 | 44 | $_SESSION['itemname'] = $name; |
| 45 | 45 | |
| 46 | 46 | // finish duplicating - redirect to new plugin |
| 47 | -$header="Location: index.php?r=2&a=102&id=$newid"; |
|
| 47 | +$header = "Location: index.php?r=2&a=102&id=$newid"; |
|
| 48 | 48 | header($header); |
@@ -1,20 +1,20 @@ 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('edit_template')) { |
|
| 5 | +if (!$modx->hasPermission('edit_template')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = isset($_GET['id'])? intval($_GET['id']) : 0; |
|
| 10 | -if($id==0) { |
|
| 9 | +$id = isset($_GET['id']) ? intval($_GET['id']) : 0; |
|
| 10 | +if ($id == 0) { |
|
| 11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // count duplicates |
| 15 | 15 | $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_tmplvars'), "id='{$id}'")); |
| 16 | 16 | $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_tmplvars'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'")); |
| 17 | -if($count>=1) $count = ' '.($count+1); |
|
| 17 | +if ($count >= 1) $count = ' '.($count + 1); |
|
| 18 | 18 | else $count = ''; |
| 19 | 19 | |
| 20 | 20 | // duplicate TV |
@@ -56,5 +56,5 @@ discard block |
||
| 56 | 56 | $_SESSION['itemname'] = $name; |
| 57 | 57 | |
| 58 | 58 | // finish duplicating - redirect to new variable |
| 59 | -$header="Location: index.php?r=2&a=301&id=$newid"; |
|
| 59 | +$header = "Location: index.php?r=2&a=301&id=$newid"; |
|
| 60 | 60 | header($header); |
@@ -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 | |
| 6 | -if(!isset($_GET['id'])) { |
|
| 7 | - if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | +if (!isset($_GET['id'])) { |
|
| 7 | + if (!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 8 | 8 | |
| 9 | 9 | // Remove all locks |
| 10 | 10 | $modx->db->truncate($modx->getFullTableName('active_user_locks')); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $type = intval($_GET['type']); |
| 17 | 17 | $id = intval($_GET['id']); |
| 18 | 18 | $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button |
| 19 | - if($type && $id) { |
|
| 19 | + if ($type && $id) { |
|
| 20 | 20 | $modx->unlockElement($type, $id, $includeAllUsers); |
| 21 | 21 | echo '1'; |
| 22 | 22 | exit; |
@@ -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_module')) { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
| 30 | 30 | $categoryid = 0; |
| 31 | 31 | } else { |
| 32 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 32 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 33 | 33 | $categoryid = checkCategory($_POST['newcategory']); |
| 34 | 34 | if (!$categoryid) { |
| 35 | 35 | $categoryid = newCategory($_POST['newcategory']); |
@@ -48,12 +48,12 @@ discard block |
||
| 48 | 48 | $enable_sharedparams = isset($parsed['shareparams']) ? intval($parsed['shareparams']) : $enable_sharedparams; |
| 49 | 49 | |
| 50 | 50 | $description = isset($parsed['description']) ? $parsed['description'] : $description; |
| 51 | - $version = isset($parsed['version']) ? '<b>' . $parsed['version'] . '</b> ' : ''; |
|
| 51 | + $version = isset($parsed['version']) ? '<b>'.$parsed['version'].'</b> ' : ''; |
|
| 52 | 52 | if ($version) { |
| 53 | - $description = $version . trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
| 53 | + $description = $version.trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
| 54 | 54 | } |
| 55 | 55 | if (isset($parsed['modx_category'])) { |
| 56 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 56 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 57 | 57 | $categoryid = getCategory($parsed['modx_category']); |
| 58 | 58 | } |
| 59 | 59 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | // finished emptying cache - redirect |
| 112 | 112 | if ($_POST['stay'] != '') { |
| 113 | 113 | $a = ($_POST['stay'] == '2') ? "108&id=$newid" : "107"; |
| 114 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 114 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 115 | 115 | header($header); |
| 116 | 116 | } else { |
| 117 | 117 | $header = "Location: index.php?a=106&r=2"; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | // finished emptying cache - redirect |
| 169 | 169 | if ($_POST['stay'] != '') { |
| 170 | 170 | $a = ($_POST['stay'] == '2') ? "108&id=$id" : "107"; |
| 171 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 171 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 172 | 172 | header($header); |
| 173 | 173 | } else { |
| 174 | 174 | $modx->unlockElement(6, $id); |
@@ -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('web_access_permissions')) { |
|
| 5 | +if (!$modx->hasPermission('web_access_permissions')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | switch ($operation) { |
| 23 | 23 | case "add_user_group" : |
| 24 | 24 | $newgroup = $_REQUEST['newusergroup']; |
| 25 | - if(empty($newgroup)) { |
|
| 25 | + if (empty($newgroup)) { |
|
| 26 | 26 | $modx->webAlertAndQuit("No group name specified."); |
| 27 | 27 | } else { |
| 28 | 28 | $id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_webgroup_names); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | break; |
| 37 | 37 | case "add_document_group" : |
| 38 | 38 | $newgroup = $_REQUEST['newdocgroup']; |
| 39 | - if(empty($newgroup)) { |
|
| 39 | + if (empty($newgroup)) { |
|
| 40 | 40 | $modx->webAlertAndQuit("No group name specified."); |
| 41 | 41 | } else { |
| 42 | 42 | $id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_documentgroup_names); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | case "delete_user_group" : |
| 52 | 52 | $updategroupaccess = true; |
| 53 | 53 | $usergroup = intval($_REQUEST['usergroup']); |
| 54 | - if(empty($usergroup)) { |
|
| 54 | + if (empty($usergroup)) { |
|
| 55 | 55 | $modx->webAlertAndQuit("No user group id specified for deletion."); |
| 56 | 56 | } else { |
| 57 | 57 | $modx->db->delete($tbl_webgroup_names, "id='{$usergroup}'"); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | break; |
| 64 | 64 | case "delete_document_group" : |
| 65 | 65 | $group = intval($_REQUEST['documentgroup']); |
| 66 | - if(empty($group)) { |
|
| 66 | + if (empty($group)) { |
|
| 67 | 67 | $modx->webAlertAndQuit("No document group id specified for deletion."); |
| 68 | 68 | } else { |
| 69 | 69 | $modx->db->delete($tbl_documentgroup_names, "id='{$group}'"); |
@@ -75,22 +75,22 @@ discard block |
||
| 75 | 75 | break; |
| 76 | 76 | case "rename_user_group" : |
| 77 | 77 | $newgroupname = $_REQUEST['newgroupname']; |
| 78 | - if(empty($newgroupname)) { |
|
| 78 | + if (empty($newgroupname)) { |
|
| 79 | 79 | $modx->webAlertAndQuit("No group name specified."); |
| 80 | 80 | } |
| 81 | 81 | $groupid = intval($_REQUEST['groupid']); |
| 82 | - if(empty($groupid)) { |
|
| 82 | + if (empty($groupid)) { |
|
| 83 | 83 | $modx->webAlertAndQuit("No user group id specified for rename."); |
| 84 | 84 | } |
| 85 | 85 | $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'"); |
| 86 | 86 | break; |
| 87 | 87 | case "rename_document_group" : |
| 88 | 88 | $newgroupname = $_REQUEST['newgroupname']; |
| 89 | - if(empty($newgroupname)) { |
|
| 89 | + if (empty($newgroupname)) { |
|
| 90 | 90 | $modx->webAlertAndQuit("No group name specified."); |
| 91 | 91 | } |
| 92 | 92 | $groupid = intval($_REQUEST['groupid']); |
| 93 | - if(empty($groupid)) { |
|
| 93 | + if (empty($groupid)) { |
|
| 94 | 94 | $modx->webAlertAndQuit("No document group id specified for rename."); |
| 95 | 95 | } |
| 96 | 96 | $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'"); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $docgroup = intval($_REQUEST['docgroup']); |
| 102 | 102 | $rs = $modx->db->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'"); |
| 103 | 103 | $limit = $modx->db->getValue($rs); |
| 104 | - if($limit<=0) { |
|
| 104 | + if ($limit <= 0) { |
|
| 105 | 105 | $modx->db->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access); |
| 106 | 106 | } else { |
| 107 | 107 | //alert user that coupling already exists? |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | // secure web documents - flag as private |
| 120 | -if($updategroupaccess==true){ |
|
| 120 | +if ($updategroupaccess == true) { |
|
| 121 | 121 | include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php"; |
| 122 | 122 | secureWebDocument(); |
| 123 | 123 | |
@@ -1,20 +1,20 @@ 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('edit_document')) { |
|
| 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) $modx->webAlertAndQuit($_lang["error_movedocument1"]); |
|
| 16 | -if($documentID <= 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]); |
|
| 17 | -if($newParentID < 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]); |
|
| 15 | +if ($documentID == $newParentID) $modx->webAlertAndQuit($_lang["error_movedocument1"]); |
|
| 16 | +if ($documentID <= 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]); |
|
| 17 | +if ($newParentID < 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]); |
|
| 18 | 18 | |
| 19 | 19 | $parents = $modx->getParentIds($newParentID); |
| 20 | 20 | if (in_array($documentID, $parents)) $modx->webAlertAndQuit($_lang["error_movedocument2"]); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | if ($use_udperms == 1) { |
| 28 | 28 | if ($oldparent != $newParentID) { |
| 29 | - include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php"; |
|
| 29 | + include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php"; |
|
| 30 | 30 | $udperms = new udperms(); |
| 31 | 31 | $udperms->user = $modx->getLoginUserID(); |
| 32 | 32 | $udperms->document = $newParentID; |
@@ -38,29 +38,29 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | -function allChildren($currDocID) { |
|
| 41 | +function allChildren($currDocID){ |
|
| 42 | 42 | global $modx; |
| 43 | - $children= array(); |
|
| 43 | + $children = array(); |
|
| 44 | 44 | $rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "parent = '{$currDocID}'"); |
| 45 | - while ($child= $modx->db->getRow($rs)) { |
|
| 46 | - $children[]= $child['id']; |
|
| 47 | - $nextgen= array(); |
|
| 48 | - $nextgen= allChildren($child['id']); |
|
| 49 | - $children= array_merge($children, $nextgen); |
|
| 45 | + while ($child = $modx->db->getRow($rs)) { |
|
| 46 | + $children[] = $child['id']; |
|
| 47 | + $nextgen = array(); |
|
| 48 | + $nextgen = allChildren($child['id']); |
|
| 49 | + $children = array_merge($children, $nextgen); |
|
| 50 | 50 | } |
| 51 | 51 | return $children; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | -$evtOut = $modx->invokeEvent("onBeforeMoveDocument", array ( |
|
| 54 | +$evtOut = $modx->invokeEvent("onBeforeMoveDocument", array( |
|
| 55 | 55 | "id_document" => $documentID, |
| 56 | 56 | "old_parent" => $oldparent, |
| 57 | 57 | "new_parent" => $newParentID |
| 58 | 58 | )); |
| 59 | -if (is_array($evtOut) && count($evtOut) > 0){ |
|
| 59 | +if (is_array($evtOut) && count($evtOut) > 0) { |
|
| 60 | 60 | $newParent = array_pop($evtOut); |
| 61 | - if($newParent == $oldparent) { |
|
| 61 | + if ($newParent == $oldparent) { |
|
| 62 | 62 | $modx->webAlertAndQuit($_lang["error_movedocument2"]); |
| 63 | - }else{ |
|
| 63 | + } else { |
|
| 64 | 64 | $newParentID = $newParent; |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_content'), "parent='{$oldparent}'"); |
| 82 | 82 | $limit = $modx->db->getValue($rs); |
| 83 | 83 | |
| 84 | - if(!$limit>0) { |
|
| 84 | + if (!$limit > 0) { |
|
| 85 | 85 | $modx->db->update(array( |
| 86 | 86 | 'isfolder' => 0, |
| 87 | 87 | ), $modx->getFullTableName('site_content'), "id='{$oldparent}'"); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $pagetitle = $modx->db->getValue($modx->db->select('pagetitle', $modx->getFullTableName('site_content'), "id='{$documentID}'")); |
| 91 | 91 | $_SESSION['itemname'] = $pagetitle; |
| 92 | 92 | |
| 93 | - $modx->invokeEvent("onAfterMoveDocument", array ( |
|
| 93 | + $modx->invokeEvent("onAfterMoveDocument", array( |
|
| 94 | 94 | "id_document" => $documentID, |
| 95 | 95 | "old_parent" => $oldparent, |
| 96 | 96 | "new_parent" => $newParentID |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | // empty cache & sync site |
| 100 | 100 | $modx->clearCache('full'); |
| 101 | 101 | |
| 102 | - $header="Location: index.php?a=3&id={$documentID}&r=9"; |
|
| 102 | + $header = "Location: index.php?a=3&id={$documentID}&r=9"; |
|
| 103 | 103 | header($header); |
| 104 | 104 | } else { |
| 105 | 105 | $modx->webAlertAndQuit("You cannot move a document to a child document!"); |
@@ -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_chunk')) { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
| 21 | 21 | $categoryid = 0; |
| 22 | 22 | } else { |
| 23 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 23 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 24 | 24 | $categoryid = checkCategory($_POST['newcategory']); |
| 25 | 25 | if (!$categoryid) { |
| 26 | 26 | $categoryid = newCategory($_POST['newcategory']); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // finished emptying cache - redirect |
| 81 | 81 | if ($_POST['stay'] != '') { |
| 82 | 82 | $a = ($_POST['stay'] == '2') ? "78&id=$newid" : "77"; |
| 83 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 83 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 84 | 84 | header($header); |
| 85 | 85 | } else { |
| 86 | 86 | $header = "Location: index.php?a=76&r=2"; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | // finished emptying cache - redirect |
| 130 | 130 | if ($_POST['stay'] != '') { |
| 131 | 131 | $a = ($_POST['stay'] == '2') ? "78&id=$id" : "77"; |
| 132 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 132 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 133 | 133 | header($header); |
| 134 | 134 | } else { |
| 135 | 135 | $modx->unlockElement(3, $id); |
@@ -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'])? intval($_GET['id']) : 0; |
|
| 10 | -if($id==0) { |
|
| 9 | +$id = isset($_GET['id']) ? intval($_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); |