@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
|
| 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('change_password')) {
|
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | ?> |
| 9 | 9 | |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
|
| 3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
|
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('settings')) {
|
| 6 | - $modx->webAlertAndQuit($_lang['error_no_privileges']); |
|
| 6 | + $modx->webAlertAndQuit($_lang['error_no_privileges']); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/functions.inc.php'); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | // check to see the edit settings page isn't locked |
| 12 | 12 | $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=17 AND internalKey!='" . $modx->getLoginUserID() . "'");
|
| 13 | 13 | if($username = $modx->db->getValue($rs)) {
|
| 14 | - $modx->webAlertAndQuit(sprintf($_lang['lock_settings_msg'], $username)); |
|
| 14 | + $modx->webAlertAndQuit(sprintf($_lang['lock_settings_msg'], $username)); |
|
| 15 | 15 | } |
| 16 | 16 | // end check for lock |
| 17 | 17 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | include_once(MODX_MANAGER_PATH . 'includes/default_config.php'); |
| 22 | 22 | $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]system_settings');
|
| 23 | 23 | while($row = $modx->db->getRow($rs)) {
|
| 24 | - $settings[$row['setting_name']] = $row['setting_value']; |
|
| 24 | + $settings[$row['setting_name']] = $row['setting_value']; |
|
| 25 | 25 | } |
| 26 | 26 | $settings['filemanager_path'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['filemanager_path']);
|
| 27 | 27 | $settings['rb_base_dir'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['rb_base_dir']);
|
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | $lang_keys = array(); |
| 33 | 33 | $dir = dir('includes/lang');
|
| 34 | 34 | while($file = $dir->read()) {
|
| 35 | - if(strpos($file, '.inc.php') > 0) {
|
|
| 36 | - $endpos = strpos($file, '.'); |
|
| 37 | - $languagename = substr($file, 0, $endpos); |
|
| 38 | - $lang_keys[$languagename] = get_lang_keys($file); |
|
| 39 | - } |
|
| 35 | + if(strpos($file, '.inc.php') > 0) {
|
|
| 36 | + $endpos = strpos($file, '.'); |
|
| 37 | + $languagename = substr($file, 0, $endpos); |
|
| 38 | + $lang_keys[$languagename] = get_lang_keys($file); |
|
| 39 | + } |
|
| 40 | 40 | } |
| 41 | 41 | $dir->close(); |
| 42 | 42 | $displayStyle = ($_SESSION['browser'] === 'modern') ? 'table-row' : 'block'; |
@@ -78,14 +78,14 @@ discard block |
||
| 78 | 78 | </script> |
| 79 | 79 | |
| 80 | 80 | <?php |
| 81 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab1_site_settings.inc.php'); |
|
| 82 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab2_furl_settings.inc.php'); |
|
| 83 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab3_user_settings.inc.php'); |
|
| 84 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab4_manager_settings.inc.php'); |
|
| 85 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab5_security_settings.inc.php'); |
|
| 86 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab6_filemanager_settings.inc.php'); |
|
| 87 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab7_filebrowser_settings.inc.php'); |
|
| 88 | - ?> |
|
| 81 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab1_site_settings.inc.php'); |
|
| 82 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab2_furl_settings.inc.php'); |
|
| 83 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab3_user_settings.inc.php'); |
|
| 84 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab4_manager_settings.inc.php'); |
|
| 85 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab5_security_settings.inc.php'); |
|
| 86 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab6_filemanager_settings.inc.php'); |
|
| 87 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab7_filebrowser_settings.inc.php'); |
|
| 88 | + ?> |
|
| 89 | 89 | </div> |
| 90 | 90 | </div> |
| 91 | 91 | </form> |
@@ -132,5 +132,5 @@ discard block |
||
| 132 | 132 | </script> |
| 133 | 133 | <?php |
| 134 | 134 | if(is_numeric($_GET['tab'])) {
|
| 135 | - echo '<script type="text/javascript">tpSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
| 135 | + echo '<script type="text/javascript">tpSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
| 136 | 136 | } |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 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('access_permissions')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | // Get table names (alphabetical) |
@@ -18,24 +18,24 @@ discard block |
||
| 18 | 18 | // find all document groups, for the select :) |
| 19 | 19 | $rs = $modx->db->select('*', $tbl_documentgroup_names, '', 'name'); |
| 20 | 20 | if($modx->db->getRecordCount($rs) < 1) { |
| 21 | - $docgroupselector = '[no groups to add]'; |
|
| 21 | + $docgroupselector = '[no groups to add]'; |
|
| 22 | 22 | } else { |
| 23 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
| 24 | - while($row = $modx->db->getRow($rs)) { |
|
| 25 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
| 26 | - } |
|
| 27 | - $docgroupselector .= "</select>\n"; |
|
| 23 | + $docgroupselector = '<select name="docgroup">' . "\n"; |
|
| 24 | + while($row = $modx->db->getRow($rs)) { |
|
| 25 | + $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
| 26 | + } |
|
| 27 | + $docgroupselector .= "</select>\n"; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $rs = $modx->db->select('*', $tbl_membergroup_names, '', 'name'); |
| 31 | 31 | if($modx->db->getRecordCount($rs) < 1) { |
| 32 | - $usrgroupselector = '[no user groups]'; |
|
| 32 | + $usrgroupselector = '[no user groups]'; |
|
| 33 | 33 | } else { |
| 34 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
| 35 | - while($row = $modx->db->getRow($rs)) { |
|
| 36 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
| 37 | - } |
|
| 38 | - $usrgroupselector .= "</select>\n"; |
|
| 34 | + $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
| 35 | + while($row = $modx->db->getRow($rs)) { |
|
| 36 | + $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
| 37 | + } |
|
| 38 | + $usrgroupselector .= "</select>\n"; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | ?> |
@@ -96,24 +96,24 @@ discard block |
||
| 96 | 96 | </form> |
| 97 | 97 | </div> |
| 98 | 98 | <?php |
| 99 | - $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames |
|
| 99 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames |
|
| 100 | 100 | LEFT JOIN ' . $tbl_member_groups . ' AS groups ON groups.user_group = groupnames.id |
| 101 | 101 | LEFT JOIN ' . $tbl_manager_users . ' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
| 102 | - if($modx->db->getRecordCount($rs) < 1) { |
|
| 103 | - ?> |
|
| 102 | + if($modx->db->getRecordCount($rs) < 1) { |
|
| 103 | + ?> |
|
| 104 | 104 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 105 | 105 | <?php |
| 106 | - } else { |
|
| 107 | - ?> |
|
| 106 | + } else { |
|
| 107 | + ?> |
|
| 108 | 108 | <div class="form-group"> |
| 109 | 109 | <?php |
| 110 | - $pid = ''; |
|
| 111 | - while($row = $modx->db->getRow($rs)) { |
|
| 112 | - if($pid != $row['id']) { |
|
| 113 | - if($pid != '') { |
|
| 114 | - echo '</div><div class="form-group">'; |
|
| 115 | - } |
|
| 116 | - ?> |
|
| 110 | + $pid = ''; |
|
| 111 | + while($row = $modx->db->getRow($rs)) { |
|
| 112 | + if($pid != $row['id']) { |
|
| 113 | + if($pid != '') { |
|
| 114 | + echo '</div><div class="form-group">'; |
|
| 115 | + } |
|
| 116 | + ?> |
|
| 117 | 117 | <form method="post" action="index.php" name="accesspermissions"> |
| 118 | 118 | <input type="hidden" name="a" value="41" /> |
| 119 | 119 | <input type="hidden" name="groupid" value="<?= $row['id'] ?>" /> |
@@ -128,21 +128,21 @@ discard block |
||
| 128 | 128 | </form> |
| 129 | 129 | <?= $_lang['access_permissions_users_in_group'] ?> |
| 130 | 130 | <?php |
| 131 | - } |
|
| 132 | - if(!$row['user_id']) { |
|
| 133 | - ?> |
|
| 131 | + } |
|
| 132 | + if(!$row['user_id']) { |
|
| 133 | + ?> |
|
| 134 | 134 | <i><?= $_lang['access_permissions_no_users_in_group'] ?></i> |
| 135 | 135 | <?php |
| 136 | - $pid = $row['id']; |
|
| 137 | - continue; |
|
| 138 | - } |
|
| 139 | - ?> |
|
| 136 | + $pid = $row['id']; |
|
| 137 | + continue; |
|
| 138 | + } |
|
| 139 | + ?> |
|
| 140 | 140 | <?= ($pid == $row['id'] ? ', ' : '') ?><a href="index.php?a=12&id=<?= $row['user_id'] ?>"><?= $row['user_name'] ?></a> |
| 141 | 141 | <?php |
| 142 | - $pid = $row['id']; |
|
| 143 | - } |
|
| 144 | - } |
|
| 145 | - ?> |
|
| 142 | + $pid = $row['id']; |
|
| 143 | + } |
|
| 144 | + } |
|
| 145 | + ?> |
|
| 146 | 146 | </div> |
| 147 | 147 | </div> |
| 148 | 148 | </div> |
@@ -167,24 +167,24 @@ discard block |
||
| 167 | 167 | </form> |
| 168 | 168 | </div> |
| 169 | 169 | <?php |
| 170 | - $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames |
|
| 170 | + $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames |
|
| 171 | 171 | LEFT JOIN ' . $tbl_document_groups . ' AS dg ON dg.document_group = dgnames.id |
| 172 | 172 | LEFT JOIN ' . $tbl_site_content . ' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
| 173 | - if($modx->db->getRecordCount($rs) < 1) { |
|
| 174 | - ?> |
|
| 173 | + if($modx->db->getRecordCount($rs) < 1) { |
|
| 174 | + ?> |
|
| 175 | 175 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 176 | 176 | <?php |
| 177 | - } else { |
|
| 178 | - ?> |
|
| 177 | + } else { |
|
| 178 | + ?> |
|
| 179 | 179 | <div class="form-group"> |
| 180 | 180 | <?php |
| 181 | - $pid = ''; |
|
| 182 | - while($row = $modx->db->getRow($rs)) { |
|
| 183 | - if($pid != $row['id']) { |
|
| 184 | - if($pid != '') { |
|
| 185 | - echo '</div><div class="form-group">'; |
|
| 186 | - } |
|
| 187 | - ?> |
|
| 181 | + $pid = ''; |
|
| 182 | + while($row = $modx->db->getRow($rs)) { |
|
| 183 | + if($pid != $row['id']) { |
|
| 184 | + if($pid != '') { |
|
| 185 | + echo '</div><div class="form-group">'; |
|
| 186 | + } |
|
| 187 | + ?> |
|
| 188 | 188 | <form method="post" action="index.php" name="accesspermissions"> |
| 189 | 189 | <input type="hidden" name="a" value="41" /> |
| 190 | 190 | <input type="hidden" name="groupid" value="<?= $row['id'] ?>" /> |
@@ -199,21 +199,21 @@ discard block |
||
| 199 | 199 | </form> |
| 200 | 200 | <?= $_lang['access_permissions_resources_in_group'] ?> |
| 201 | 201 | <?php |
| 202 | - } |
|
| 203 | - if(!$row['doc_id']) { |
|
| 204 | - ?> |
|
| 202 | + } |
|
| 203 | + if(!$row['doc_id']) { |
|
| 204 | + ?> |
|
| 205 | 205 | <i><?= $_lang['access_permissions_no_resources_in_group'] ?></i> |
| 206 | 206 | <?php |
| 207 | - $pid = $row['id']; |
|
| 208 | - continue; |
|
| 209 | - } |
|
| 210 | - ?> |
|
| 207 | + $pid = $row['id']; |
|
| 208 | + continue; |
|
| 209 | + } |
|
| 210 | + ?> |
|
| 211 | 211 | <?= ($pid == $row['id'] ? ', ' : '') ?><a href="index.php?a=3&id=<?= $row['doc_id'] ?>" title="<?= $modx->htmlspecialchars($row['doc_title']) ?>"><?= $row['doc_id'] ?></a> |
| 212 | 212 | <?php |
| 213 | - $pid = $row['id']; |
|
| 214 | - } |
|
| 215 | - } |
|
| 216 | - ?> |
|
| 213 | + $pid = $row['id']; |
|
| 214 | + } |
|
| 215 | + } |
|
| 216 | + ?> |
|
| 217 | 217 | </div> |
| 218 | 218 | </div> |
| 219 | 219 | </div> |
@@ -225,16 +225,16 @@ discard block |
||
| 225 | 225 | <div class="container container-body"> |
| 226 | 226 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
| 227 | 227 | <?php |
| 228 | - // User/Document Group Links |
|
| 229 | - $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames |
|
| 228 | + // User/Document Group Links |
|
| 229 | + $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames |
|
| 230 | 230 | LEFT JOIN ' . $tbl_membergroup_access . ' AS groupacc ON groupacc.membergroup = groupnames.id |
| 231 | 231 | LEFT JOIN ' . $tbl_documentgroup_names . ' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
| 232 | - if($modx->db->getRecordCount($rs) < 1) { |
|
| 233 | - ?> |
|
| 232 | + if($modx->db->getRecordCount($rs) < 1) { |
|
| 233 | + ?> |
|
| 234 | 234 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 235 | 235 | <?php |
| 236 | - } else { |
|
| 237 | - ?> |
|
| 236 | + } else { |
|
| 237 | + ?> |
|
| 238 | 238 | <div class="form-group"> |
| 239 | 239 | <b><?= $_lang["access_permissions_group_link"] ?></b> |
| 240 | 240 | <form method="post" action="index.php" name="accesspermissions"> |
@@ -250,38 +250,38 @@ discard block |
||
| 250 | 250 | <hr> |
| 251 | 251 | <ul> |
| 252 | 252 | <?php |
| 253 | - $pid = ''; |
|
| 254 | - while($row = $modx->db->getRow($rs)) { |
|
| 255 | - if($row['id'] != $pid) { |
|
| 256 | - if($pid != '') { |
|
| 257 | - echo '</ul></li>'; |
|
| 258 | - } // close previous one |
|
| 259 | - ?> |
|
| 253 | + $pid = ''; |
|
| 254 | + while($row = $modx->db->getRow($rs)) { |
|
| 255 | + if($row['id'] != $pid) { |
|
| 256 | + if($pid != '') { |
|
| 257 | + echo '</ul></li>'; |
|
| 258 | + } // close previous one |
|
| 259 | + ?> |
|
| 260 | 260 | <li><b><?= $row['name'] ?></b></li> |
| 261 | 261 | <?php |
| 262 | - if(!$row['dg_id']) { |
|
| 263 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
| 264 | - $pid = ''; |
|
| 265 | - continue; |
|
| 266 | - } else { |
|
| 267 | - echo '<ul>'; |
|
| 268 | - } |
|
| 269 | - } |
|
| 270 | - if(!$row['dg_id']) { |
|
| 271 | - continue; |
|
| 272 | - } |
|
| 273 | - ?> |
|
| 262 | + if(!$row['dg_id']) { |
|
| 263 | + echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
| 264 | + $pid = ''; |
|
| 265 | + continue; |
|
| 266 | + } else { |
|
| 267 | + echo '<ul>'; |
|
| 268 | + } |
|
| 269 | + } |
|
| 270 | + if(!$row['dg_id']) { |
|
| 271 | + continue; |
|
| 272 | + } |
|
| 273 | + ?> |
|
| 274 | 274 | <li><?= $row['dg_name'] ?> |
| 275 | 275 | <small><i>(<a class="text-danger" href="index.php?a=41&coupling=<?= $row['link_id'] ?>&operation=remove_document_group_from_user_group"><?= $_lang['remove'] ?></a>)</i></small> |
| 276 | 276 | </li> |
| 277 | 277 | <?php |
| 278 | - $pid = $row['id']; |
|
| 279 | - } |
|
| 280 | - ?> |
|
| 278 | + $pid = $row['id']; |
|
| 279 | + } |
|
| 280 | + ?> |
|
| 281 | 281 | </ul> |
| 282 | 282 | <?php |
| 283 | - } |
|
| 284 | - ?> |
|
| 283 | + } |
|
| 284 | + ?> |
|
| 285 | 285 | </div> |
| 286 | 286 | </div> |
| 287 | 287 | |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
|
| 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('view_eventlog')) {
|
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | // Get table Names (alphabetical) |
@@ -16,14 +16,14 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | // get and save search string |
| 18 | 18 | if($_REQUEST['op'] == 'reset') {
|
| 19 | - $sqlQuery = $query = ''; |
|
| 20 | - $_PAGE['vs']['search'] = ''; |
|
| 19 | + $sqlQuery = $query = ''; |
|
| 20 | + $_PAGE['vs']['search'] = ''; |
|
| 21 | 21 | } else {
|
| 22 | - $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
|
| 23 | - if(!is_numeric($sqlQuery)) {
|
|
| 24 | - $sqlQuery = $modx->db->escape($query); |
|
| 25 | - } |
|
| 26 | - $_PAGE['vs']['search'] = $query; |
|
| 22 | + $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
|
| 23 | + if(!is_numeric($sqlQuery)) {
|
|
| 24 | + $sqlQuery = $modx->db->escape($query); |
|
| 25 | + } |
|
| 26 | + $_PAGE['vs']['search'] = $query; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | // get & save listmode |
@@ -125,33 +125,33 @@ discard block |
||
| 125 | 125 | <div class="row"> |
| 126 | 126 | <div class="table-responsive"> |
| 127 | 127 | <?php |
| 128 | - $ds = $modx->db->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el
|
|
| 128 | + $ds = $modx->db->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el
|
|
| 129 | 129 | LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0
|
| 130 | 130 | LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
|
| 131 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
| 132 | - $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
|
|
| 133 | - $grd->pagerClass = ''; |
|
| 134 | - $grd->pageClass = 'page-item'; |
|
| 135 | - $grd->selPageClass = 'page-item active'; |
|
| 136 | - $grd->noRecordMsg = $_lang['no_records_found']; |
|
| 137 | - $grd->cssClass = "table data nowrap"; |
|
| 138 | - $grd->columnHeaderClass = "tableHeader"; |
|
| 139 | - $grd->itemClass = "tableItem"; |
|
| 140 | - $grd->altItemClass = "tableAltItem"; |
|
| 141 | - $grd->fields = "type,source,createdon,eventid,username"; |
|
| 142 | - $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid']; |
|
| 143 | - $grd->colWidths = "1%,,1%,1%,1%"; |
|
| 144 | - $grd->colAligns = "center,,,center,center"; |
|
| 145 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
| 146 | - if($listmode == '1') {
|
|
| 147 | - $grd->pageSize = 0; |
|
| 148 | - } |
|
| 149 | - if($_REQUEST['op'] == 'reset') {
|
|
| 150 | - $grd->pageNumber = 1; |
|
| 151 | - } |
|
| 152 | - // render grid |
|
| 153 | - echo $grd->render(); |
|
| 154 | - ?> |
|
| 131 | + include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
| 132 | + $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
|
|
| 133 | + $grd->pagerClass = ''; |
|
| 134 | + $grd->pageClass = 'page-item'; |
|
| 135 | + $grd->selPageClass = 'page-item active'; |
|
| 136 | + $grd->noRecordMsg = $_lang['no_records_found']; |
|
| 137 | + $grd->cssClass = "table data nowrap"; |
|
| 138 | + $grd->columnHeaderClass = "tableHeader"; |
|
| 139 | + $grd->itemClass = "tableItem"; |
|
| 140 | + $grd->altItemClass = "tableAltItem"; |
|
| 141 | + $grd->fields = "type,source,createdon,eventid,username"; |
|
| 142 | + $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid']; |
|
| 143 | + $grd->colWidths = "1%,,1%,1%,1%"; |
|
| 144 | + $grd->colAligns = "center,,,center,center"; |
|
| 145 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
| 146 | + if($listmode == '1') {
|
|
| 147 | + $grd->pageSize = 0; |
|
| 148 | + } |
|
| 149 | + if($_REQUEST['op'] == 'reset') {
|
|
| 150 | + $grd->pageNumber = 1; |
|
| 151 | + } |
|
| 152 | + // render grid |
|
| 153 | + echo $grd->render(); |
|
| 154 | + ?> |
|
| 155 | 155 | </div> |
| 156 | 156 | </div> |
| 157 | 157 | </div> |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | if( $uncategorized_elements = $cm->getAssignedElements( 0, $_data['elements'] ) ) |
| 23 | 23 | { |
| 24 | - $output .= $cm->renderView('chunks/categorize/uncategorized_elements', $uncategorized_elements); |
|
| 24 | + $output .= $cm->renderView('chunks/categorize/uncategorized_elements', $uncategorized_elements); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | foreach( $cm->getCategories() as $category ) |
@@ -106,14 +106,14 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | if( empty( $category ) ) |
| 108 | 108 | { |
| 109 | - $cm->addMessage( $cm->txt('cm_enter_name_for_category'), 'add' ); |
|
| 110 | - return; |
|
| 109 | + $cm->addMessage( $cm->txt('cm_enter_name_for_category'), 'add' ); |
|
| 110 | + return; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | if( $cm->isCategoryExists( $category ) ) |
| 114 | 114 | { |
| 115 | - $cm->addMessage( sprintf( $cm->txt('cm_category_x_exists'), $category ), 'add' ); |
|
| 116 | - return; |
|
| 115 | + $cm->addMessage( sprintf( $cm->txt('cm_category_x_exists'), $category ), 'add' ); |
|
| 116 | + return; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | if( $cm->addCategory( $category, $rank ) !== 0 ) |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 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('view_eventlog')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | // get id |
@@ -41,18 +41,18 @@ discard block |
||
| 41 | 41 | <div class="tab-page"> |
| 42 | 42 | <div class="container container-body"> |
| 43 | 43 | <?php |
| 44 | - $date = $modx->toDateFormat($content["createdon"]); |
|
| 45 | - if($content["type"] == 1) { |
|
| 46 | - $icon = $_style['actions_info'] . ' text-info'; |
|
| 47 | - $msgtype = $_lang["information"]; |
|
| 48 | - } else if($content["type"] == 2) { |
|
| 49 | - $icon = $_style['actions_triangle'] . ' text-warning'; |
|
| 50 | - $msgtype = $_lang["warning"]; |
|
| 51 | - } else if($content["type"] == 3) { |
|
| 52 | - $icon = $_style['actions_error'] . ' text-danger'; |
|
| 53 | - $msgtype = $_lang["error"]; |
|
| 54 | - } |
|
| 55 | - ?> |
|
| 44 | + $date = $modx->toDateFormat($content["createdon"]); |
|
| 45 | + if($content["type"] == 1) { |
|
| 46 | + $icon = $_style['actions_info'] . ' text-info'; |
|
| 47 | + $msgtype = $_lang["information"]; |
|
| 48 | + } else if($content["type"] == 2) { |
|
| 49 | + $icon = $_style['actions_triangle'] . ' text-warning'; |
|
| 50 | + $msgtype = $_lang["warning"]; |
|
| 51 | + } else if($content["type"] == 3) { |
|
| 52 | + $icon = $_style['actions_error'] . ' text-danger'; |
|
| 53 | + $msgtype = $_lang["error"]; |
|
| 54 | + } |
|
| 55 | + ?> |
|
| 56 | 56 | <p><b><?= $content['source'] . " - " . $_lang['eventlog_viewer'] ?></b></p> |
| 57 | 57 | <p> |
| 58 | 58 | <i class="<?= $icon ?>"></i> <?= $msgtype ?> |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 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 | global $SystemAlertMsgQueque; |
| 6 | 6 | // display system alert window if messages are available |
| 7 | 7 | if(count($SystemAlertMsgQueque) > 0) { |
| 8 | - include "sysalert.display.inc.php"; |
|
| 8 | + include "sysalert.display.inc.php"; |
|
| 9 | 9 | } |
| 10 | 10 | ?> |
| 11 | 11 | <script type='text/javascript'> |
@@ -19,17 +19,17 @@ discard block |
||
| 19 | 19 | </script> |
| 20 | 20 | <?php |
| 21 | 21 | if(in_array($modx->manager->action, array( |
| 22 | - 85, |
|
| 23 | - 27, |
|
| 24 | - 4, |
|
| 25 | - 72, |
|
| 26 | - 13, |
|
| 27 | - 11, |
|
| 28 | - 12, |
|
| 29 | - 87, |
|
| 30 | - 88 |
|
| 22 | + 85, |
|
| 23 | + 27, |
|
| 24 | + 4, |
|
| 25 | + 72, |
|
| 26 | + 13, |
|
| 27 | + 11, |
|
| 28 | + 12, |
|
| 29 | + 87, |
|
| 30 | + 88 |
|
| 31 | 31 | ))) { |
| 32 | - echo $modx->manager->loadDatePicker($modx->config['mgr_date_picker_path']); |
|
| 32 | + echo $modx->manager->loadDatePicker($modx->config['mgr_date_picker_path']); |
|
| 33 | 33 | } |
| 34 | 34 | ?> |
| 35 | 35 | </body> |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('export_static')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $maxtime = (is_numeric($_POST['maxtime'])) ? $_POST['maxtime'] : 30; |
@@ -17,11 +17,11 @@ discard block |
||
| 17 | 17 | $modx->export->targetDir = $export_dir; |
| 18 | 18 | |
| 19 | 19 | if(strpos($modx->config['base_path'],"{$export_dir}/")===0 && 0 <= strlen(str_replace("{$export_dir}/",'',$modx->config['base_path']))) |
| 20 | - return $_lang['export_site.static.php6']; |
|
| 20 | + return $_lang['export_site.static.php6']; |
|
| 21 | 21 | elseif($modx->config['rb_base_dir'] === $export_dir . '/') |
| 22 | - return $modx->parsePlaceholder($_lang['export_site.static.php7'],'rb_base_url=' . $modx->config['base_url'] . $modx->config['rb_base_url']); |
|
| 22 | + return $modx->parsePlaceholder($_lang['export_site.static.php7'],'rb_base_url=' . $modx->config['base_url'] . $modx->config['rb_base_url']); |
|
| 23 | 23 | elseif(!is_writable($export_dir)) |
| 24 | - return $_lang['export_site_target_unwritable']; |
|
| 24 | + return $_lang['export_site_target_unwritable']; |
|
| 25 | 25 | |
| 26 | 26 | $modx->export->generate_mode = $_POST['generate_mode']; |
| 27 | 27 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | ||$includenoncache!==$_POST['includenoncache'] |
| 38 | 38 | ||$repl_before!==$_POST['repl_before'] |
| 39 | 39 | ||$repl_after !==$_POST['repl_after']) { |
| 40 | - $modx->clearCache('full'); |
|
| 40 | + $modx->clearCache('full'); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $total = $modx->export->getTotal($_POST['ignore_ids'], $modx->config['export_includenoncache']); |
@@ -1,135 +1,135 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 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_role')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | extract($_POST); |
| 10 | 10 | |
| 11 | 11 | if($name == '' || !isset ($name)) { |
| 12 | - $modx->webAlertAndQuit("Please enter a name for this role!", "index.php?a={$mode}" . ($mode = 35 ? "&id={$id}" : "")); |
|
| 12 | + $modx->webAlertAndQuit("Please enter a name for this role!", "index.php?a={$mode}" . ($mode = 35 ? "&id={$id}" : "")); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | // setup fields |
| 16 | 16 | $fields = array( |
| 17 | - 'name' => $name, |
|
| 18 | - 'description' => $description, |
|
| 19 | - 'frames' => $frames, |
|
| 20 | - 'home' => $home, |
|
| 21 | - 'view_document' => $view_document, |
|
| 22 | - 'new_document' => $new_document, |
|
| 23 | - 'save_document' => $save_document, |
|
| 24 | - 'publish_document' => $publish_document, |
|
| 25 | - 'delete_document' => $delete_document, |
|
| 26 | - 'empty_trash' => $empty_trash, |
|
| 27 | - 'action_ok' => $action_ok, |
|
| 28 | - 'logout' => $logout, |
|
| 29 | - 'help' => $help, |
|
| 30 | - 'messages' => $messages, |
|
| 31 | - 'new_user' => $new_user, |
|
| 32 | - 'edit_user' => $edit_user, |
|
| 33 | - 'logs' => $logs, |
|
| 34 | - 'edit_parser' => (isset ($edit_parser)) ? $edit_parser : '0', |
|
| 35 | - 'save_parser' => (isset ($save_parser)) ? $save_parser : '0', |
|
| 36 | - 'edit_template' => $edit_template, |
|
| 37 | - 'settings' => $settings, |
|
| 38 | - 'credits' => $credits, |
|
| 39 | - 'new_template' => $new_template, |
|
| 40 | - 'save_template' => $save_template, |
|
| 41 | - 'delete_template' => $delete_template, |
|
| 42 | - 'edit_snippet' => $edit_snippet, |
|
| 43 | - 'new_snippet' => $new_snippet, |
|
| 44 | - 'save_snippet' => $save_snippet, |
|
| 45 | - 'delete_snippet' => $delete_snippet, |
|
| 46 | - 'edit_chunk' => $edit_chunk, |
|
| 47 | - 'new_chunk' => $new_chunk, |
|
| 48 | - 'save_chunk' => $save_chunk, |
|
| 49 | - 'delete_chunk' => $delete_chunk, |
|
| 50 | - 'empty_cache' => $empty_cache, |
|
| 51 | - 'edit_document' => $edit_document, |
|
| 52 | - 'change_password' => $change_password, |
|
| 53 | - 'error_dialog' => $error_dialog, |
|
| 54 | - 'about' => $about, |
|
| 55 | - 'file_manager' => $file_manager, |
|
| 56 | - 'assets_files' => $assets_files, |
|
| 57 | - 'assets_images' => $assets_images, |
|
| 58 | - 'save_user' => $save_user, |
|
| 59 | - 'delete_user' => $delete_user, |
|
| 60 | - 'save_password' => $save_password, |
|
| 61 | - 'edit_role' => $edit_role, |
|
| 62 | - 'save_role' => $save_role, |
|
| 63 | - 'delete_role' => $delete_role, |
|
| 64 | - 'new_role' => $new_role, |
|
| 65 | - 'access_permissions' => $access_permissions, |
|
| 66 | - 'bk_manager' => $bk_manager, |
|
| 67 | - 'new_plugin' => $new_plugin, |
|
| 68 | - 'edit_plugin' => $edit_plugin, |
|
| 69 | - 'save_plugin' => $save_plugin, |
|
| 70 | - 'delete_plugin' => $delete_plugin, |
|
| 71 | - 'new_module' => $new_module, |
|
| 72 | - 'edit_module' => $edit_module, |
|
| 73 | - 'save_module' => $save_module, |
|
| 74 | - 'delete_module' => $delete_module, |
|
| 75 | - 'exec_module' => $exec_module, |
|
| 76 | - 'view_eventlog' => $view_eventlog, |
|
| 77 | - 'delete_eventlog' => $delete_eventlog, |
|
| 78 | - 'new_web_user' => $new_web_user, |
|
| 79 | - 'edit_web_user' => $edit_web_user, |
|
| 80 | - 'save_web_user' => $save_web_user, |
|
| 81 | - 'delete_web_user' => $delete_web_user, |
|
| 82 | - 'web_access_permissions' => $web_access_permissions, |
|
| 83 | - 'view_unpublished' => $view_unpublished, |
|
| 84 | - 'import_static' => $import_static, |
|
| 85 | - 'export_static' => $export_static, |
|
| 86 | - 'remove_locks' => $remove_locks, |
|
| 87 | - 'display_locks' => $display_locks, |
|
| 88 | - 'change_resourcetype' => $change_resourcetype, |
|
| 89 | - 'category_manager' => $category_manager |
|
| 17 | + 'name' => $name, |
|
| 18 | + 'description' => $description, |
|
| 19 | + 'frames' => $frames, |
|
| 20 | + 'home' => $home, |
|
| 21 | + 'view_document' => $view_document, |
|
| 22 | + 'new_document' => $new_document, |
|
| 23 | + 'save_document' => $save_document, |
|
| 24 | + 'publish_document' => $publish_document, |
|
| 25 | + 'delete_document' => $delete_document, |
|
| 26 | + 'empty_trash' => $empty_trash, |
|
| 27 | + 'action_ok' => $action_ok, |
|
| 28 | + 'logout' => $logout, |
|
| 29 | + 'help' => $help, |
|
| 30 | + 'messages' => $messages, |
|
| 31 | + 'new_user' => $new_user, |
|
| 32 | + 'edit_user' => $edit_user, |
|
| 33 | + 'logs' => $logs, |
|
| 34 | + 'edit_parser' => (isset ($edit_parser)) ? $edit_parser : '0', |
|
| 35 | + 'save_parser' => (isset ($save_parser)) ? $save_parser : '0', |
|
| 36 | + 'edit_template' => $edit_template, |
|
| 37 | + 'settings' => $settings, |
|
| 38 | + 'credits' => $credits, |
|
| 39 | + 'new_template' => $new_template, |
|
| 40 | + 'save_template' => $save_template, |
|
| 41 | + 'delete_template' => $delete_template, |
|
| 42 | + 'edit_snippet' => $edit_snippet, |
|
| 43 | + 'new_snippet' => $new_snippet, |
|
| 44 | + 'save_snippet' => $save_snippet, |
|
| 45 | + 'delete_snippet' => $delete_snippet, |
|
| 46 | + 'edit_chunk' => $edit_chunk, |
|
| 47 | + 'new_chunk' => $new_chunk, |
|
| 48 | + 'save_chunk' => $save_chunk, |
|
| 49 | + 'delete_chunk' => $delete_chunk, |
|
| 50 | + 'empty_cache' => $empty_cache, |
|
| 51 | + 'edit_document' => $edit_document, |
|
| 52 | + 'change_password' => $change_password, |
|
| 53 | + 'error_dialog' => $error_dialog, |
|
| 54 | + 'about' => $about, |
|
| 55 | + 'file_manager' => $file_manager, |
|
| 56 | + 'assets_files' => $assets_files, |
|
| 57 | + 'assets_images' => $assets_images, |
|
| 58 | + 'save_user' => $save_user, |
|
| 59 | + 'delete_user' => $delete_user, |
|
| 60 | + 'save_password' => $save_password, |
|
| 61 | + 'edit_role' => $edit_role, |
|
| 62 | + 'save_role' => $save_role, |
|
| 63 | + 'delete_role' => $delete_role, |
|
| 64 | + 'new_role' => $new_role, |
|
| 65 | + 'access_permissions' => $access_permissions, |
|
| 66 | + 'bk_manager' => $bk_manager, |
|
| 67 | + 'new_plugin' => $new_plugin, |
|
| 68 | + 'edit_plugin' => $edit_plugin, |
|
| 69 | + 'save_plugin' => $save_plugin, |
|
| 70 | + 'delete_plugin' => $delete_plugin, |
|
| 71 | + 'new_module' => $new_module, |
|
| 72 | + 'edit_module' => $edit_module, |
|
| 73 | + 'save_module' => $save_module, |
|
| 74 | + 'delete_module' => $delete_module, |
|
| 75 | + 'exec_module' => $exec_module, |
|
| 76 | + 'view_eventlog' => $view_eventlog, |
|
| 77 | + 'delete_eventlog' => $delete_eventlog, |
|
| 78 | + 'new_web_user' => $new_web_user, |
|
| 79 | + 'edit_web_user' => $edit_web_user, |
|
| 80 | + 'save_web_user' => $save_web_user, |
|
| 81 | + 'delete_web_user' => $delete_web_user, |
|
| 82 | + 'web_access_permissions' => $web_access_permissions, |
|
| 83 | + 'view_unpublished' => $view_unpublished, |
|
| 84 | + 'import_static' => $import_static, |
|
| 85 | + 'export_static' => $export_static, |
|
| 86 | + 'remove_locks' => $remove_locks, |
|
| 87 | + 'display_locks' => $display_locks, |
|
| 88 | + 'change_resourcetype' => $change_resourcetype, |
|
| 89 | + 'category_manager' => $category_manager |
|
| 90 | 90 | ); |
| 91 | 91 | |
| 92 | 92 | $fields = $modx->db->escape($fields); |
| 93 | 93 | |
| 94 | 94 | switch($_POST['mode']) { |
| 95 | - case '38' : |
|
| 96 | - $tbl = $modx->getFullTableName("user_roles"); |
|
| 95 | + case '38' : |
|
| 96 | + $tbl = $modx->getFullTableName("user_roles"); |
|
| 97 | 97 | |
| 98 | - // disallow duplicate names for role |
|
| 99 | - $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}'"); |
|
| 100 | - if($modx->db->getValue($rs) > 0) { |
|
| 101 | - $modx->manager->saveFormValues(38); |
|
| 102 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=38"); |
|
| 103 | - } |
|
| 98 | + // disallow duplicate names for role |
|
| 99 | + $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}'"); |
|
| 100 | + if($modx->db->getValue($rs) > 0) { |
|
| 101 | + $modx->manager->saveFormValues(38); |
|
| 102 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=38"); |
|
| 103 | + } |
|
| 104 | 104 | |
| 105 | - $modx->db->insert($fields, $tbl); |
|
| 105 | + $modx->db->insert($fields, $tbl); |
|
| 106 | 106 | |
| 107 | - // Set the item name for logger |
|
| 108 | - $_SESSION['itemname'] = $_POST['name']; |
|
| 107 | + // Set the item name for logger |
|
| 108 | + $_SESSION['itemname'] = $_POST['name']; |
|
| 109 | 109 | |
| 110 | - $header = "Location: index.php?a=86&r=2"; |
|
| 111 | - header($header); |
|
| 112 | - break; |
|
| 113 | - case '35' : |
|
| 114 | - $tbl = $modx->getFullTableName("user_roles"); |
|
| 110 | + $header = "Location: index.php?a=86&r=2"; |
|
| 111 | + header($header); |
|
| 112 | + break; |
|
| 113 | + case '35' : |
|
| 114 | + $tbl = $modx->getFullTableName("user_roles"); |
|
| 115 | 115 | |
| 116 | - // disallow duplicate names for role |
|
| 117 | - $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}' AND id!='{$id}'"); |
|
| 118 | - if($modx->db->getValue($rs) > 0) { |
|
| 119 | - $modx->manager->saveFormValues(35); |
|
| 120 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=35&id={$id}"); |
|
| 121 | - } |
|
| 116 | + // disallow duplicate names for role |
|
| 117 | + $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}' AND id!='{$id}'"); |
|
| 118 | + if($modx->db->getValue($rs) > 0) { |
|
| 119 | + $modx->manager->saveFormValues(35); |
|
| 120 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=35&id={$id}"); |
|
| 121 | + } |
|
| 122 | 122 | |
| 123 | - $modx->db->update($fields, $tbl, "id='{$id}'"); |
|
| 123 | + $modx->db->update($fields, $tbl, "id='{$id}'"); |
|
| 124 | 124 | |
| 125 | - // Set the item name for logger |
|
| 126 | - $_SESSION['itemname'] = $_POST['name']; |
|
| 125 | + // Set the item name for logger |
|
| 126 | + $_SESSION['itemname'] = $_POST['name']; |
|
| 127 | 127 | |
| 128 | - $header = "Location: index.php?a=86&r=2"; |
|
| 129 | - header($header); |
|
| 130 | - break; |
|
| 131 | - default : |
|
| 132 | - $modx->webAlertAndQuit("No operation set in request."); |
|
| 128 | + $header = "Location: index.php?a=86&r=2"; |
|
| 129 | + header($header); |
|
| 130 | + break; |
|
| 131 | + default : |
|
| 132 | + $modx->webAlertAndQuit("No operation set in request."); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | $modx->unlockElement(8, $id); |