@@ -66,111 +66,111 @@ |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | switch ($_POST['mode']) { |
| 69 | - case '23': // Save new snippet |
|
| 70 | - |
|
| 71 | - // invoke OnBeforeSnipFormSave event |
|
| 72 | - $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 73 | - "mode" => "new", |
|
| 74 | - "id" => $id |
|
| 75 | - )); |
|
| 76 | - |
|
| 77 | - // disallow duplicate names for new snippets |
|
| 78 | - $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_snippets'), "name='{$name}'"); |
|
| 79 | - $count = $modx->db->getValue($rs); |
|
| 80 | - if ($count > 0) { |
|
| 81 | - $modx->manager->saveFormValues(23); |
|
| 82 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=23"); |
|
| 83 | - } |
|
| 84 | - |
|
| 85 | - //do stuff to save the new doc |
|
| 86 | - $newid = $modx->db->insert(array( |
|
| 87 | - 'name' => $name, |
|
| 88 | - 'description' => $description, |
|
| 89 | - 'snippet' => $snippet, |
|
| 90 | - 'moduleguid' => $moduleguid, |
|
| 91 | - 'locked' => $locked, |
|
| 92 | - 'properties' => $properties, |
|
| 93 | - 'category' => $categoryid, |
|
| 94 | - 'disabled' => $disabled, |
|
| 95 | - 'createdon' => $currentdate, |
|
| 96 | - 'editedon' => $currentdate |
|
| 97 | - ), $modx->getFullTableName('site_snippets')); |
|
| 98 | - |
|
| 99 | - // invoke OnSnipFormSave event |
|
| 100 | - $modx->invokeEvent("OnSnipFormSave", array( |
|
| 101 | - "mode" => "new", |
|
| 102 | - "id" => $newid |
|
| 103 | - )); |
|
| 104 | - |
|
| 105 | - // Set the item name for logger |
|
| 106 | - $_SESSION['itemname'] = $name; |
|
| 107 | - |
|
| 108 | - // empty cache |
|
| 109 | - $modx->clearCache('full'); |
|
| 110 | - |
|
| 111 | - // finished emptying cache - redirect |
|
| 112 | - if ($_POST['stay'] != '') { |
|
| 113 | - $a = ($_POST['stay'] == '2') ? "22&id=$newid" : "23"; |
|
| 114 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 115 | - header($header); |
|
| 116 | - } else { |
|
| 117 | - $header = "Location: index.php?a=76&r=2"; |
|
| 118 | - header($header); |
|
| 119 | - } |
|
| 120 | - break; |
|
| 121 | - case '22': // Save existing snippet |
|
| 122 | - // invoke OnBeforeSnipFormSave event |
|
| 123 | - $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 124 | - "mode" => "upd", |
|
| 125 | - "id" => $id |
|
| 126 | - )); |
|
| 127 | - |
|
| 128 | - // disallow duplicate names for snippets |
|
| 129 | - $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_snippets'), "name='{$name}' AND id!='{$id}'"); |
|
| 130 | - if ($modx->db->getValue($rs) > 0) { |
|
| 131 | - $modx->manager->saveFormValues(22); |
|
| 132 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=22&id={$id}"); |
|
| 133 | - } |
|
| 134 | - |
|
| 135 | - //do stuff to save the edited doc |
|
| 136 | - $modx->db->update(array( |
|
| 137 | - 'name' => $name, |
|
| 138 | - 'description' => $description, |
|
| 139 | - 'snippet' => $snippet, |
|
| 140 | - 'moduleguid' => $moduleguid, |
|
| 141 | - 'locked' => $locked, |
|
| 142 | - 'properties' => $properties, |
|
| 143 | - 'category' => $categoryid, |
|
| 144 | - 'disabled' => $disabled, |
|
| 145 | - 'editedon' => $currentdate |
|
| 146 | - ), $modx->getFullTableName('site_snippets'), "id='{$id}'"); |
|
| 147 | - |
|
| 148 | - // invoke OnSnipFormSave event |
|
| 149 | - $modx->invokeEvent("OnSnipFormSave", array( |
|
| 150 | - "mode" => "upd", |
|
| 151 | - "id" => $id |
|
| 152 | - )); |
|
| 153 | - |
|
| 154 | - // Set the item name for logger |
|
| 155 | - $_SESSION['itemname'] = $name; |
|
| 156 | - |
|
| 157 | - // empty cache |
|
| 158 | - $modx->clearCache('full'); |
|
| 159 | - |
|
| 160 | - if ($_POST['runsnippet']) { |
|
| 161 | - run_snippet($snippet); |
|
| 162 | - } |
|
| 163 | - // finished emptying cache - redirect |
|
| 164 | - if ($_POST['stay'] != '') { |
|
| 165 | - $a = ($_POST['stay'] == '2') ? "22&id=$id" : "23"; |
|
| 166 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 167 | - header($header); |
|
| 168 | - } else { |
|
| 169 | - $modx->unlockElement(4, $id); |
|
| 170 | - $header = "Location: index.php?a=76&r=2"; |
|
| 171 | - header($header); |
|
| 172 | - } |
|
| 173 | - break; |
|
| 174 | - default: |
|
| 175 | - $modx->webAlertAndQuit("No operation set in request."); |
|
| 69 | + case '23': // Save new snippet |
|
| 70 | + |
|
| 71 | + // invoke OnBeforeSnipFormSave event |
|
| 72 | + $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 73 | + "mode" => "new", |
|
| 74 | + "id" => $id |
|
| 75 | + )); |
|
| 76 | + |
|
| 77 | + // disallow duplicate names for new snippets |
|
| 78 | + $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_snippets'), "name='{$name}'"); |
|
| 79 | + $count = $modx->db->getValue($rs); |
|
| 80 | + if ($count > 0) { |
|
| 81 | + $modx->manager->saveFormValues(23); |
|
| 82 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=23"); |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + //do stuff to save the new doc |
|
| 86 | + $newid = $modx->db->insert(array( |
|
| 87 | + 'name' => $name, |
|
| 88 | + 'description' => $description, |
|
| 89 | + 'snippet' => $snippet, |
|
| 90 | + 'moduleguid' => $moduleguid, |
|
| 91 | + 'locked' => $locked, |
|
| 92 | + 'properties' => $properties, |
|
| 93 | + 'category' => $categoryid, |
|
| 94 | + 'disabled' => $disabled, |
|
| 95 | + 'createdon' => $currentdate, |
|
| 96 | + 'editedon' => $currentdate |
|
| 97 | + ), $modx->getFullTableName('site_snippets')); |
|
| 98 | + |
|
| 99 | + // invoke OnSnipFormSave event |
|
| 100 | + $modx->invokeEvent("OnSnipFormSave", array( |
|
| 101 | + "mode" => "new", |
|
| 102 | + "id" => $newid |
|
| 103 | + )); |
|
| 104 | + |
|
| 105 | + // Set the item name for logger |
|
| 106 | + $_SESSION['itemname'] = $name; |
|
| 107 | + |
|
| 108 | + // empty cache |
|
| 109 | + $modx->clearCache('full'); |
|
| 110 | + |
|
| 111 | + // finished emptying cache - redirect |
|
| 112 | + if ($_POST['stay'] != '') { |
|
| 113 | + $a = ($_POST['stay'] == '2') ? "22&id=$newid" : "23"; |
|
| 114 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 115 | + header($header); |
|
| 116 | + } else { |
|
| 117 | + $header = "Location: index.php?a=76&r=2"; |
|
| 118 | + header($header); |
|
| 119 | + } |
|
| 120 | + break; |
|
| 121 | + case '22': // Save existing snippet |
|
| 122 | + // invoke OnBeforeSnipFormSave event |
|
| 123 | + $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 124 | + "mode" => "upd", |
|
| 125 | + "id" => $id |
|
| 126 | + )); |
|
| 127 | + |
|
| 128 | + // disallow duplicate names for snippets |
|
| 129 | + $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_snippets'), "name='{$name}' AND id!='{$id}'"); |
|
| 130 | + if ($modx->db->getValue($rs) > 0) { |
|
| 131 | + $modx->manager->saveFormValues(22); |
|
| 132 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=22&id={$id}"); |
|
| 133 | + } |
|
| 134 | + |
|
| 135 | + //do stuff to save the edited doc |
|
| 136 | + $modx->db->update(array( |
|
| 137 | + 'name' => $name, |
|
| 138 | + 'description' => $description, |
|
| 139 | + 'snippet' => $snippet, |
|
| 140 | + 'moduleguid' => $moduleguid, |
|
| 141 | + 'locked' => $locked, |
|
| 142 | + 'properties' => $properties, |
|
| 143 | + 'category' => $categoryid, |
|
| 144 | + 'disabled' => $disabled, |
|
| 145 | + 'editedon' => $currentdate |
|
| 146 | + ), $modx->getFullTableName('site_snippets'), "id='{$id}'"); |
|
| 147 | + |
|
| 148 | + // invoke OnSnipFormSave event |
|
| 149 | + $modx->invokeEvent("OnSnipFormSave", array( |
|
| 150 | + "mode" => "upd", |
|
| 151 | + "id" => $id |
|
| 152 | + )); |
|
| 153 | + |
|
| 154 | + // Set the item name for logger |
|
| 155 | + $_SESSION['itemname'] = $name; |
|
| 156 | + |
|
| 157 | + // empty cache |
|
| 158 | + $modx->clearCache('full'); |
|
| 159 | + |
|
| 160 | + if ($_POST['runsnippet']) { |
|
| 161 | + run_snippet($snippet); |
|
| 162 | + } |
|
| 163 | + // finished emptying cache - redirect |
|
| 164 | + if ($_POST['stay'] != '') { |
|
| 165 | + $a = ($_POST['stay'] == '2') ? "22&id=$id" : "23"; |
|
| 166 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 167 | + header($header); |
|
| 168 | + } else { |
|
| 169 | + $modx->unlockElement(4, $id); |
|
| 170 | + $header = "Location: index.php?a=76&r=2"; |
|
| 171 | + header($header); |
|
| 172 | + } |
|
| 173 | + break; |
|
| 174 | + default: |
|
| 175 | + $modx->webAlertAndQuit("No operation set in request."); |
|
| 176 | 176 | } |
@@ -190,53 +190,53 @@ |
||
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | switch($installMode){ |
| 193 | - case 0: |
|
| 194 | - case 2: |
|
| 195 | - $database_collation = isset($_POST['database_collation']) ? $_POST['database_collation'] : 'utf8_general_ci'; |
|
| 196 | - $database_charset = substr($database_collation, 0, strpos($database_collation, '_')); |
|
| 197 | - $_POST['database_connection_charset'] = $database_charset; |
|
| 198 | - if(empty($_SESSION['databaseloginpassword'])) |
|
| 199 | - $_SESSION['databaseloginpassword'] = $_POST['databaseloginpassword']; |
|
| 200 | - if(empty($_SESSION['databaseloginname'])) |
|
| 201 | - $_SESSION['databaseloginname'] = $_POST['databaseloginname']; |
|
| 202 | - break; |
|
| 203 | - case 1: |
|
| 204 | - include $base_path . MGR_DIR . '/includes/config.inc.php'; |
|
| 205 | - if (@ $conn = mysqli_connect($database_server, $database_user, $database_password)) { |
|
| 206 | - if (@ mysqli_query($conn, "USE {$dbase}")) { |
|
| 207 | - if (!$rs = mysqli_query($conn, "show session variables like 'collation_database'")) { |
|
| 208 | - $rs = mysqli_query($conn, "show session variables like 'collation_server'"); |
|
| 209 | - } |
|
| 210 | - if ($rs && $collation = mysqli_fetch_row($rs)) { |
|
| 211 | - $database_collation = trim($collation[1]); |
|
| 193 | + case 0: |
|
| 194 | + case 2: |
|
| 195 | + $database_collation = isset($_POST['database_collation']) ? $_POST['database_collation'] : 'utf8_general_ci'; |
|
| 196 | + $database_charset = substr($database_collation, 0, strpos($database_collation, '_')); |
|
| 197 | + $_POST['database_connection_charset'] = $database_charset; |
|
| 198 | + if(empty($_SESSION['databaseloginpassword'])) |
|
| 199 | + $_SESSION['databaseloginpassword'] = $_POST['databaseloginpassword']; |
|
| 200 | + if(empty($_SESSION['databaseloginname'])) |
|
| 201 | + $_SESSION['databaseloginname'] = $_POST['databaseloginname']; |
|
| 202 | + break; |
|
| 203 | + case 1: |
|
| 204 | + include $base_path . MGR_DIR . '/includes/config.inc.php'; |
|
| 205 | + if (@ $conn = mysqli_connect($database_server, $database_user, $database_password)) { |
|
| 206 | + if (@ mysqli_query($conn, "USE {$dbase}")) { |
|
| 207 | + if (!$rs = mysqli_query($conn, "show session variables like 'collation_database'")) { |
|
| 208 | + $rs = mysqli_query($conn, "show session variables like 'collation_server'"); |
|
| 209 | + } |
|
| 210 | + if ($rs && $collation = mysqli_fetch_row($rs)) { |
|
| 211 | + $database_collation = trim($collation[1]); |
|
| 212 | + } |
|
| 212 | 213 | } |
| 213 | 214 | } |
| 214 | - } |
|
| 215 | - if (empty ($database_collation)) $database_collation = 'utf8_general_ci'; |
|
| 215 | + if (empty ($database_collation)) $database_collation = 'utf8_general_ci'; |
|
| 216 | 216 | |
| 217 | - $database_charset = substr($database_collation, 0, strpos($database_collation, '_')); |
|
| 218 | - if (!isset ($database_connection_charset) || empty ($database_connection_charset)) { |
|
| 219 | - $database_connection_charset = $database_charset; |
|
| 220 | - } |
|
| 217 | + $database_charset = substr($database_collation, 0, strpos($database_collation, '_')); |
|
| 218 | + if (!isset ($database_connection_charset) || empty ($database_connection_charset)) { |
|
| 219 | + $database_connection_charset = $database_charset; |
|
| 220 | + } |
|
| 221 | 221 | |
| 222 | - if (!isset ($database_connection_method) || empty ($database_connection_method)) { |
|
| 223 | - $database_connection_method = 'SET CHARACTER SET'; |
|
| 224 | - if (function_exists('mysqli_set_charset')) mysqli_set_charset($conn, $database_connection_charset); |
|
| 225 | - } |
|
| 226 | - if ($database_connection_method != 'SET NAMES' && $database_connection_charset != $database_charset) { |
|
| 227 | - $database_connection_method = 'SET NAMES'; |
|
| 228 | - } |
|
| 222 | + if (!isset ($database_connection_method) || empty ($database_connection_method)) { |
|
| 223 | + $database_connection_method = 'SET CHARACTER SET'; |
|
| 224 | + if (function_exists('mysqli_set_charset')) mysqli_set_charset($conn, $database_connection_charset); |
|
| 225 | + } |
|
| 226 | + if ($database_connection_method != 'SET NAMES' && $database_connection_charset != $database_charset) { |
|
| 227 | + $database_connection_method = 'SET NAMES'; |
|
| 228 | + } |
|
| 229 | 229 | |
| 230 | - $_POST['database_name'] = $dbase; |
|
| 231 | - $_POST['tableprefix'] = $table_prefix; |
|
| 232 | - $_POST['database_connection_charset'] = $database_connection_charset; |
|
| 233 | - $_POST['database_connection_method'] = $database_connection_method; |
|
| 234 | - $_POST['databasehost'] = $database_server; |
|
| 235 | - $_SESSION['databaseloginname'] = $database_user; |
|
| 236 | - $_SESSION['databaseloginpassword'] = $database_password; |
|
| 237 | - break; |
|
| 238 | - default: |
|
| 239 | - throw new Exception('installmode is undefined'); |
|
| 230 | + $_POST['database_name'] = $dbase; |
|
| 231 | + $_POST['tableprefix'] = $table_prefix; |
|
| 232 | + $_POST['database_connection_charset'] = $database_connection_charset; |
|
| 233 | + $_POST['database_connection_method'] = $database_connection_method; |
|
| 234 | + $_POST['databasehost'] = $database_server; |
|
| 235 | + $_SESSION['databaseloginname'] = $database_user; |
|
| 236 | + $_SESSION['databaseloginpassword'] = $database_password; |
|
| 237 | + break; |
|
| 238 | + default: |
|
| 239 | + throw new Exception('installmode is undefined'); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | $ph['install_language'] = $install_language; |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) { |
| 7 | - case 78: |
|
| 8 | - if (!$modx->hasPermission('edit_chunk')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 77: |
|
| 13 | - if (!$modx->hasPermission('new_chunk')) { |
|
| 7 | + case 78: |
|
| 8 | + if (!$modx->hasPermission('edit_chunk')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 77: |
|
| 13 | + if (!$modx->hasPermission('new_chunk')) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) { |
| 7 | - case 102: |
|
| 8 | - if (!$modx->hasPermission('edit_plugin')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 101: |
|
| 13 | - if (!$modx->hasPermission('new_plugin')) { |
|
| 7 | + case 102: |
|
| 8 | + if (!$modx->hasPermission('edit_plugin')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 101: |
|
| 13 | + if (!$modx->hasPermission('new_plugin')) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) { |
| 7 | - case 22: |
|
| 8 | - if (!$modx->hasPermission('edit_snippet')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 23: |
|
| 13 | - if (!$modx->hasPermission('new_snippet')) { |
|
| 7 | + case 22: |
|
| 8 | + if (!$modx->hasPermission('edit_snippet')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 23: |
|
| 13 | + if (!$modx->hasPermission('new_snippet')) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -33,115 +33,115 @@ |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | switch ($_POST['mode']) { |
| 36 | - case '19': |
|
| 37 | - |
|
| 38 | - // invoke OnBeforeTempFormSave event |
|
| 39 | - $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
| 40 | - "mode" => "new", |
|
| 41 | - "id" => $id |
|
| 42 | - )); |
|
| 43 | - |
|
| 44 | - // disallow duplicate names for new templates |
|
| 45 | - $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}'"); |
|
| 46 | - $count = $modx->db->getValue($rs); |
|
| 47 | - if ($count > 0) { |
|
| 48 | - $modx->manager->saveFormValues(19); |
|
| 49 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=19"); |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - //do stuff to save the new doc |
|
| 53 | - $newid = $modx->db->insert(array( |
|
| 54 | - 'templatename' => $templatename, |
|
| 55 | - 'description' => $description, |
|
| 56 | - 'content' => $template, |
|
| 57 | - 'locked' => $locked, |
|
| 58 | - 'selectable' => $selectable, |
|
| 59 | - 'category' => $categoryid, |
|
| 60 | - 'createdon' => $currentdate, |
|
| 61 | - 'editedon' => $currentdate |
|
| 62 | - ), $modx->getFullTableName('site_templates')); |
|
| 63 | - |
|
| 64 | - // invoke OnTempFormSave event |
|
| 65 | - $modx->invokeEvent("OnTempFormSave", array( |
|
| 66 | - "mode" => "new", |
|
| 67 | - "id" => $newid |
|
| 68 | - )); |
|
| 69 | - // Set new assigned Tvs |
|
| 70 | - saveTemplateAccess($newid); |
|
| 71 | - |
|
| 72 | - // Set the item name for logger |
|
| 73 | - $_SESSION['itemname'] = $templatename; |
|
| 74 | - |
|
| 75 | - // empty cache |
|
| 76 | - $modx->clearCache('full'); |
|
| 77 | - |
|
| 78 | - // finished emptying cache - redirect |
|
| 79 | - if ($_POST['stay'] != '') { |
|
| 80 | - $a = ($_POST['stay'] == '2') ? "16&id=$newid" : "19"; |
|
| 81 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 82 | - header($header); |
|
| 83 | - } else { |
|
| 84 | - $header = "Location: index.php?a=76&r=2"; |
|
| 85 | - header($header); |
|
| 86 | - } |
|
| 87 | - |
|
| 88 | - break; |
|
| 89 | - case '16': |
|
| 90 | - |
|
| 91 | - // invoke OnBeforeTempFormSave event |
|
| 92 | - $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
| 93 | - "mode" => "upd", |
|
| 94 | - "id" => $id |
|
| 95 | - )); |
|
| 96 | - |
|
| 97 | - // disallow duplicate names for templates |
|
| 98 | - $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}' AND id!='{$id}'"); |
|
| 99 | - $count = $modx->db->getValue($rs); |
|
| 100 | - if ($count > 0) { |
|
| 101 | - $modx->manager->saveFormValues(16); |
|
| 102 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=16&id={$id}"); |
|
| 103 | - } |
|
| 104 | - |
|
| 105 | - //do stuff to save the edited doc |
|
| 106 | - $modx->db->update(array( |
|
| 107 | - 'templatename' => $templatename, |
|
| 108 | - 'description' => $description, |
|
| 109 | - 'content' => $template, |
|
| 110 | - 'locked' => $locked, |
|
| 111 | - 'selectable' => $selectable, |
|
| 112 | - 'category' => $categoryid, |
|
| 113 | - 'editedon' => $currentdate |
|
| 114 | - ), $modx->getFullTableName('site_templates'), "id='{$id}'"); |
|
| 115 | - // Set new assigned Tvs |
|
| 116 | - saveTemplateAccess($id); |
|
| 117 | - |
|
| 118 | - // invoke OnTempFormSave event |
|
| 119 | - $modx->invokeEvent("OnTempFormSave", array( |
|
| 120 | - "mode" => "upd", |
|
| 121 | - "id" => $id |
|
| 122 | - )); |
|
| 123 | - |
|
| 124 | - // Set the item name for logger |
|
| 125 | - $_SESSION['itemname'] = $templatename; |
|
| 126 | - |
|
| 127 | - // first empty the cache |
|
| 128 | - $modx->clearCache('full'); |
|
| 129 | - |
|
| 130 | - // finished emptying cache - redirect |
|
| 131 | - if ($_POST['stay'] != '') { |
|
| 132 | - $a = ($_POST['stay'] == '2') ? "16&id=$id" : "19"; |
|
| 133 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 134 | - header($header); |
|
| 135 | - } else { |
|
| 136 | - $modx->unlockElement(1, $id); |
|
| 137 | - $header = "Location: index.php?a=76&r=2"; |
|
| 138 | - header($header); |
|
| 139 | - } |
|
| 140 | - |
|
| 141 | - |
|
| 142 | - break; |
|
| 143 | - default: |
|
| 144 | - $modx->webAlertAndQuit("No operation set in request."); |
|
| 36 | + case '19': |
|
| 37 | + |
|
| 38 | + // invoke OnBeforeTempFormSave event |
|
| 39 | + $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
| 40 | + "mode" => "new", |
|
| 41 | + "id" => $id |
|
| 42 | + )); |
|
| 43 | + |
|
| 44 | + // disallow duplicate names for new templates |
|
| 45 | + $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}'"); |
|
| 46 | + $count = $modx->db->getValue($rs); |
|
| 47 | + if ($count > 0) { |
|
| 48 | + $modx->manager->saveFormValues(19); |
|
| 49 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=19"); |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + //do stuff to save the new doc |
|
| 53 | + $newid = $modx->db->insert(array( |
|
| 54 | + 'templatename' => $templatename, |
|
| 55 | + 'description' => $description, |
|
| 56 | + 'content' => $template, |
|
| 57 | + 'locked' => $locked, |
|
| 58 | + 'selectable' => $selectable, |
|
| 59 | + 'category' => $categoryid, |
|
| 60 | + 'createdon' => $currentdate, |
|
| 61 | + 'editedon' => $currentdate |
|
| 62 | + ), $modx->getFullTableName('site_templates')); |
|
| 63 | + |
|
| 64 | + // invoke OnTempFormSave event |
|
| 65 | + $modx->invokeEvent("OnTempFormSave", array( |
|
| 66 | + "mode" => "new", |
|
| 67 | + "id" => $newid |
|
| 68 | + )); |
|
| 69 | + // Set new assigned Tvs |
|
| 70 | + saveTemplateAccess($newid); |
|
| 71 | + |
|
| 72 | + // Set the item name for logger |
|
| 73 | + $_SESSION['itemname'] = $templatename; |
|
| 74 | + |
|
| 75 | + // empty cache |
|
| 76 | + $modx->clearCache('full'); |
|
| 77 | + |
|
| 78 | + // finished emptying cache - redirect |
|
| 79 | + if ($_POST['stay'] != '') { |
|
| 80 | + $a = ($_POST['stay'] == '2') ? "16&id=$newid" : "19"; |
|
| 81 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 82 | + header($header); |
|
| 83 | + } else { |
|
| 84 | + $header = "Location: index.php?a=76&r=2"; |
|
| 85 | + header($header); |
|
| 86 | + } |
|
| 87 | + |
|
| 88 | + break; |
|
| 89 | + case '16': |
|
| 90 | + |
|
| 91 | + // invoke OnBeforeTempFormSave event |
|
| 92 | + $modx->invokeEvent("OnBeforeTempFormSave", array( |
|
| 93 | + "mode" => "upd", |
|
| 94 | + "id" => $id |
|
| 95 | + )); |
|
| 96 | + |
|
| 97 | + // disallow duplicate names for templates |
|
| 98 | + $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_templates'), "templatename='{$templatename}' AND id!='{$id}'"); |
|
| 99 | + $count = $modx->db->getValue($rs); |
|
| 100 | + if ($count > 0) { |
|
| 101 | + $modx->manager->saveFormValues(16); |
|
| 102 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['template'], $templatename), "index.php?a=16&id={$id}"); |
|
| 103 | + } |
|
| 104 | + |
|
| 105 | + //do stuff to save the edited doc |
|
| 106 | + $modx->db->update(array( |
|
| 107 | + 'templatename' => $templatename, |
|
| 108 | + 'description' => $description, |
|
| 109 | + 'content' => $template, |
|
| 110 | + 'locked' => $locked, |
|
| 111 | + 'selectable' => $selectable, |
|
| 112 | + 'category' => $categoryid, |
|
| 113 | + 'editedon' => $currentdate |
|
| 114 | + ), $modx->getFullTableName('site_templates'), "id='{$id}'"); |
|
| 115 | + // Set new assigned Tvs |
|
| 116 | + saveTemplateAccess($id); |
|
| 117 | + |
|
| 118 | + // invoke OnTempFormSave event |
|
| 119 | + $modx->invokeEvent("OnTempFormSave", array( |
|
| 120 | + "mode" => "upd", |
|
| 121 | + "id" => $id |
|
| 122 | + )); |
|
| 123 | + |
|
| 124 | + // Set the item name for logger |
|
| 125 | + $_SESSION['itemname'] = $templatename; |
|
| 126 | + |
|
| 127 | + // first empty the cache |
|
| 128 | + $modx->clearCache('full'); |
|
| 129 | + |
|
| 130 | + // finished emptying cache - redirect |
|
| 131 | + if ($_POST['stay'] != '') { |
|
| 132 | + $a = ($_POST['stay'] == '2') ? "16&id=$id" : "19"; |
|
| 133 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 134 | + header($header); |
|
| 135 | + } else { |
|
| 136 | + $modx->unlockElement(1, $id); |
|
| 137 | + $header = "Location: index.php?a=76&r=2"; |
|
| 138 | + header($header); |
|
| 139 | + } |
|
| 140 | + |
|
| 141 | + |
|
| 142 | + break; |
|
| 143 | + default: |
|
| 144 | + $modx->webAlertAndQuit("No operation set in request."); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -59,125 +59,125 @@ |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | switch ($_POST['mode']) { |
| 62 | - case '107': |
|
| 63 | - // invoke OnBeforeModFormSave event |
|
| 64 | - $modx->invokeEvent("OnBeforeModFormSave", array( |
|
| 65 | - "mode" => "new", |
|
| 66 | - "id" => $id |
|
| 67 | - )); |
|
| 68 | - |
|
| 69 | - // disallow duplicate names for new modules |
|
| 70 | - $rs = $modx->db->select('count(id)', $modx->getFullTableName('site_modules'), "name='{$name}'"); |
|
| 71 | - $count = $modx->db->getValue($rs); |
|
| 72 | - if ($count > 0) { |
|
| 73 | - $modx->manager->saveFormValues(107); |
|
| 74 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_module'], $name), "index.php?a=107"); |
|
| 75 | - } |
|
| 62 | + case '107': |
|
| 63 | + // invoke OnBeforeModFormSave event |
|
| 64 | + $modx->invokeEvent("OnBeforeModFormSave", array( |
|
| 65 | + "mode" => "new", |
|
| 66 | + "id" => $id |
|
| 67 | + )); |
|
| 68 | + |
|
| 69 | + // disallow duplicate names for new modules |
|
| 70 | + $rs = $modx->db->select('count(id)', $modx->getFullTableName('site_modules'), "name='{$name}'"); |
|
| 71 | + $count = $modx->db->getValue($rs); |
|
| 72 | + if ($count > 0) { |
|
| 73 | + $modx->manager->saveFormValues(107); |
|
| 74 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_module'], $name), "index.php?a=107"); |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - // save the new module |
|
| 78 | - $newid = $modx->db->insert(array( |
|
| 79 | - 'name' => $name, |
|
| 80 | - 'description' => $description, |
|
| 81 | - 'disabled' => $disabled, |
|
| 82 | - 'wrap' => $wrap, |
|
| 83 | - 'locked' => $locked, |
|
| 84 | - 'icon' => $icon, |
|
| 85 | - 'resourcefile' => $resourcefile, |
|
| 86 | - 'enable_resource' => $enable_resource, |
|
| 87 | - 'category' => $categoryid, |
|
| 88 | - 'enable_sharedparams' => $enable_sharedparams, |
|
| 89 | - 'guid' => $guid, |
|
| 90 | - 'modulecode' => $modulecode, |
|
| 91 | - 'properties' => $properties, |
|
| 92 | - 'createdon' => $currentdate, |
|
| 93 | - 'editedon' => $currentdate |
|
| 94 | - ), $modx->getFullTableName('site_modules')); |
|
| 95 | - |
|
| 96 | - // save user group access permissions |
|
| 97 | - saveUserGroupAccessPermissons(); |
|
| 98 | - |
|
| 99 | - // invoke OnModFormSave event |
|
| 100 | - $modx->invokeEvent("OnModFormSave", array( |
|
| 101 | - "mode" => "new", |
|
| 102 | - "id" => $newid |
|
| 103 | - )); |
|
| 104 | - |
|
| 105 | - // Set the item name for logger |
|
| 106 | - $_SESSION['itemname'] = $name; |
|
| 107 | - |
|
| 108 | - // empty cache |
|
| 109 | - $modx->clearCache('full'); |
|
| 110 | - |
|
| 111 | - // finished emptying cache - redirect |
|
| 112 | - if ($_POST['stay'] != '') { |
|
| 113 | - $a = ($_POST['stay'] == '2') ? "108&id=$newid" : "107"; |
|
| 114 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 115 | - header($header); |
|
| 116 | - } else { |
|
| 117 | - $header = "Location: index.php?a=106&r=2"; |
|
| 118 | - header($header); |
|
| 119 | - } |
|
| 120 | - break; |
|
| 121 | - case '108': |
|
| 122 | - // invoke OnBeforeModFormSave event |
|
| 123 | - $modx->invokeEvent("OnBeforeModFormSave", array( |
|
| 124 | - "mode" => "upd", |
|
| 125 | - "id" => $id |
|
| 126 | - )); |
|
| 127 | - |
|
| 128 | - // disallow duplicate names for new modules |
|
| 129 | - $rs = $modx->db->select('count(id)', $modx->getFullTableName('site_modules'), "name='{$name}' AND id!='{$id}'"); |
|
| 130 | - if ($modx->db->getValue($rs) > 0) { |
|
| 131 | - $modx->manager->saveFormValues(108); |
|
| 132 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_module'], $name), "index.php?a=108&id={$id}"); |
|
| 133 | - } |
|
| 77 | + // save the new module |
|
| 78 | + $newid = $modx->db->insert(array( |
|
| 79 | + 'name' => $name, |
|
| 80 | + 'description' => $description, |
|
| 81 | + 'disabled' => $disabled, |
|
| 82 | + 'wrap' => $wrap, |
|
| 83 | + 'locked' => $locked, |
|
| 84 | + 'icon' => $icon, |
|
| 85 | + 'resourcefile' => $resourcefile, |
|
| 86 | + 'enable_resource' => $enable_resource, |
|
| 87 | + 'category' => $categoryid, |
|
| 88 | + 'enable_sharedparams' => $enable_sharedparams, |
|
| 89 | + 'guid' => $guid, |
|
| 90 | + 'modulecode' => $modulecode, |
|
| 91 | + 'properties' => $properties, |
|
| 92 | + 'createdon' => $currentdate, |
|
| 93 | + 'editedon' => $currentdate |
|
| 94 | + ), $modx->getFullTableName('site_modules')); |
|
| 95 | + |
|
| 96 | + // save user group access permissions |
|
| 97 | + saveUserGroupAccessPermissons(); |
|
| 98 | + |
|
| 99 | + // invoke OnModFormSave event |
|
| 100 | + $modx->invokeEvent("OnModFormSave", array( |
|
| 101 | + "mode" => "new", |
|
| 102 | + "id" => $newid |
|
| 103 | + )); |
|
| 104 | + |
|
| 105 | + // Set the item name for logger |
|
| 106 | + $_SESSION['itemname'] = $name; |
|
| 107 | + |
|
| 108 | + // empty cache |
|
| 109 | + $modx->clearCache('full'); |
|
| 110 | + |
|
| 111 | + // finished emptying cache - redirect |
|
| 112 | + if ($_POST['stay'] != '') { |
|
| 113 | + $a = ($_POST['stay'] == '2') ? "108&id=$newid" : "107"; |
|
| 114 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 115 | + header($header); |
|
| 116 | + } else { |
|
| 117 | + $header = "Location: index.php?a=106&r=2"; |
|
| 118 | + header($header); |
|
| 119 | + } |
|
| 120 | + break; |
|
| 121 | + case '108': |
|
| 122 | + // invoke OnBeforeModFormSave event |
|
| 123 | + $modx->invokeEvent("OnBeforeModFormSave", array( |
|
| 124 | + "mode" => "upd", |
|
| 125 | + "id" => $id |
|
| 126 | + )); |
|
| 127 | + |
|
| 128 | + // disallow duplicate names for new modules |
|
| 129 | + $rs = $modx->db->select('count(id)', $modx->getFullTableName('site_modules'), "name='{$name}' AND id!='{$id}'"); |
|
| 130 | + if ($modx->db->getValue($rs) > 0) { |
|
| 131 | + $modx->manager->saveFormValues(108); |
|
| 132 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_module'], $name), "index.php?a=108&id={$id}"); |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | - // save the edited module |
|
| 136 | - $modx->db->update(array( |
|
| 137 | - 'name' => $name, |
|
| 138 | - 'description' => $description, |
|
| 139 | - 'icon' => $icon, |
|
| 140 | - 'enable_resource' => $enable_resource, |
|
| 141 | - 'resourcefile' => $resourcefile, |
|
| 142 | - 'disabled' => $disabled, |
|
| 143 | - 'wrap' => $wrap, |
|
| 144 | - 'locked' => $locked, |
|
| 145 | - 'category' => $categoryid, |
|
| 146 | - 'enable_sharedparams' => $enable_sharedparams, |
|
| 147 | - 'guid' => $guid, |
|
| 148 | - 'modulecode' => $modulecode, |
|
| 149 | - 'properties' => $properties, |
|
| 150 | - 'editedon' => $currentdate |
|
| 151 | - ), $modx->getFullTableName('site_modules'), "id='{$id}'"); |
|
| 152 | - |
|
| 153 | - // save user group access permissions |
|
| 154 | - saveUserGroupAccessPermissons(); |
|
| 155 | - |
|
| 156 | - // invoke OnModFormSave event |
|
| 157 | - $modx->invokeEvent("OnModFormSave", array( |
|
| 158 | - "mode" => "upd", |
|
| 159 | - "id" => $id |
|
| 160 | - )); |
|
| 161 | - |
|
| 162 | - // Set the item name for logger |
|
| 163 | - $_SESSION['itemname'] = $name; |
|
| 164 | - |
|
| 165 | - // empty cache |
|
| 166 | - $modx->clearCache('full'); |
|
| 167 | - |
|
| 168 | - // finished emptying cache - redirect |
|
| 169 | - if ($_POST['stay'] != '') { |
|
| 170 | - $a = ($_POST['stay'] == '2') ? "108&id=$id" : "107"; |
|
| 171 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 172 | - header($header); |
|
| 173 | - } else { |
|
| 174 | - $modx->unlockElement(6, $id); |
|
| 175 | - $header = "Location: index.php?a=106&r=2"; |
|
| 176 | - header($header); |
|
| 177 | - } |
|
| 178 | - break; |
|
| 179 | - default: |
|
| 180 | - $modx->webAlertAndQuit("No operation set in request."); |
|
| 135 | + // save the edited module |
|
| 136 | + $modx->db->update(array( |
|
| 137 | + 'name' => $name, |
|
| 138 | + 'description' => $description, |
|
| 139 | + 'icon' => $icon, |
|
| 140 | + 'enable_resource' => $enable_resource, |
|
| 141 | + 'resourcefile' => $resourcefile, |
|
| 142 | + 'disabled' => $disabled, |
|
| 143 | + 'wrap' => $wrap, |
|
| 144 | + 'locked' => $locked, |
|
| 145 | + 'category' => $categoryid, |
|
| 146 | + 'enable_sharedparams' => $enable_sharedparams, |
|
| 147 | + 'guid' => $guid, |
|
| 148 | + 'modulecode' => $modulecode, |
|
| 149 | + 'properties' => $properties, |
|
| 150 | + 'editedon' => $currentdate |
|
| 151 | + ), $modx->getFullTableName('site_modules'), "id='{$id}'"); |
|
| 152 | + |
|
| 153 | + // save user group access permissions |
|
| 154 | + saveUserGroupAccessPermissons(); |
|
| 155 | + |
|
| 156 | + // invoke OnModFormSave event |
|
| 157 | + $modx->invokeEvent("OnModFormSave", array( |
|
| 158 | + "mode" => "upd", |
|
| 159 | + "id" => $id |
|
| 160 | + )); |
|
| 161 | + |
|
| 162 | + // Set the item name for logger |
|
| 163 | + $_SESSION['itemname'] = $name; |
|
| 164 | + |
|
| 165 | + // empty cache |
|
| 166 | + $modx->clearCache('full'); |
|
| 167 | + |
|
| 168 | + // finished emptying cache - redirect |
|
| 169 | + if ($_POST['stay'] != '') { |
|
| 170 | + $a = ($_POST['stay'] == '2') ? "108&id=$id" : "107"; |
|
| 171 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 172 | + header($header); |
|
| 173 | + } else { |
|
| 174 | + $modx->unlockElement(6, $id); |
|
| 175 | + $header = "Location: index.php?a=106&r=2"; |
|
| 176 | + header($header); |
|
| 177 | + } |
|
| 178 | + break; |
|
| 179 | + default: |
|
| 180 | + $modx->webAlertAndQuit("No operation set in request."); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | /** |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) { |
| 7 | - case 16: |
|
| 8 | - if (!$modx->hasPermission('edit_template')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 19: |
|
| 13 | - if (!$modx->hasPermission('new_template')) { |
|
| 7 | + case 16: |
|
| 8 | + if (!$modx->hasPermission('edit_template')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 19: |
|
| 13 | + if (!$modx->hasPermission('new_template')) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) {
|
| 7 | - case 88: |
|
| 8 | - if (!$modx->hasPermission('edit_web_user')) {
|
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 87: |
|
| 13 | - if (!$modx->hasPermission('new_web_user')) {
|
|
| 7 | + case 88: |
|
| 8 | + if (!$modx->hasPermission('edit_web_user')) {
|
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 87: |
|
| 13 | + if (!$modx->hasPermission('new_web_user')) {
|
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $user = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |