@@ -159,7 +159,7 @@ |
||
| 159 | 159 | <?php |
| 160 | 160 | // invoke OnFriendlyURLSettingsRender event |
| 161 | 161 | $evtOut = $modx->invokeEvent('OnFriendlyURLSettingsRender');
|
| 162 | - if (is_array($evtOut)) {
|
|
| 162 | + if (is_array($evtOut)) { |
|
| 163 | 163 | echo implode("", $evtOut);
|
| 164 | 164 | } |
| 165 | 165 | ?> |
@@ -82,23 +82,23 @@ discard block |
||
| 82 | 82 | <?php |
| 83 | 83 | |
| 84 | 84 | $currentCategory = ''; |
| 85 | - while ($row = $modx->db->getRow($rs)) {
|
|
| 85 | + while ($row = $modx->db->getRow($rs)) { |
|
| 86 | 86 | $thisCategory = $row['category']; |
| 87 | - if ($thisCategory == null) {
|
|
| 87 | + if ($thisCategory == null) { |
|
| 88 | 88 | $thisCategory = $_lang['no_category']; |
| 89 | 89 | } |
| 90 | - if ($thisCategory != $currentCategory) {
|
|
| 91 | - if ($closeOptGroup) {
|
|
| 90 | + if ($thisCategory != $currentCategory) { |
|
| 91 | + if ($closeOptGroup) { |
|
| 92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
| 93 | 93 | } |
| 94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
| 95 | 95 | $closeOptGroup = true; |
| 96 | - } else {
|
|
| 96 | + } else { |
|
| 97 | 97 | $closeOptGroup = false; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : ''; |
| 101 | - if ($selectedtext) {
|
|
| 101 | + if ($selectedtext) { |
|
| 102 | 102 | $oldTmpId = $row['id']; |
| 103 | 103 | $oldTmpName = $row['templatename']; |
| 104 | 104 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | echo "\t\t\t\t\t" . '<option value="' . $row['id'] . '"' . $selectedtext . '>' . $row['templatename'] . "</option>\n"; |
| 107 | 107 | $currentCategory = $thisCategory; |
| 108 | 108 | } |
| 109 | - if ($thisCategory != '') {
|
|
| 109 | + if ($thisCategory != '') { |
|
| 110 | 110 | echo "\t\t\t\t\t</optgroup>\n"; |
| 111 | 111 | } |
| 112 | 112 | ?> |
@@ -124,13 +124,13 @@ discard block |
||
| 124 | 124 | <th><?php echo $_lang['defaulttemplate_logic_title'];?><br><small>[(auto_template_logic)]</small></th> |
| 125 | 125 | <td> |
| 126 | 126 | <p><?php echo $_lang['defaulttemplate_logic_general_message'];?></p> |
| 127 | - <label><input type="radio" name="auto_template_logic" value="system"<?php if ($auto_template_logic == 'system') {
|
|
| 127 | + <label><input type="radio" name="auto_template_logic" value="system"<?php if ($auto_template_logic == 'system') { |
|
| 128 | 128 | echo " checked='checked'"; |
| 129 | 129 | }?>/> <?php echo $_lang['defaulttemplate_logic_system_message']; ?></label><br /> |
| 130 | - <label><input type="radio" name="auto_template_logic" value="parent"<?php if ($auto_template_logic == 'parent') {
|
|
| 130 | + <label><input type="radio" name="auto_template_logic" value="parent"<?php if ($auto_template_logic == 'parent') { |
|
| 131 | 131 | echo " checked='checked'"; |
| 132 | 132 | }?>/> <?php echo $_lang['defaulttemplate_logic_parent_message']; ?></label><br /> |
| 133 | - <label><input type="radio" name="auto_template_logic" value="sibling"<?php if ($auto_template_logic == 'sibling') {
|
|
| 133 | + <label><input type="radio" name="auto_template_logic" value="sibling"<?php if ($auto_template_logic == 'sibling') { |
|
| 134 | 134 | echo " checked='checked'"; |
| 135 | 135 | }?>/> <?php echo $_lang['defaulttemplate_logic_sibling_message']; ?></label><br /> |
| 136 | 136 | </td> |
@@ -144,10 +144,10 @@ discard block |
||
| 144 | 144 | $modx->db->select('id', '[+prefix+]site_plugins',
|
| 145 | 145 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
| 146 | 146 | ); |
| 147 | - if ($count) {
|
|
| 147 | + if ($count) { |
|
| 148 | 148 | $disabledFilters = 1; |
| 149 | 149 | echo '<b>' . $_lang['enable_filter_phx_warning'] . '</b><br/>'; |
| 150 | - } else {
|
|
| 150 | + } else { |
|
| 151 | 151 | $disabledFilters = false; |
| 152 | 152 | } |
| 153 | 153 | ?> |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5"> |
| 212 | 212 | <?php |
| 213 | 213 | $ct = explode(",", $custom_contenttype);
|
| 214 | - for ($i=0;$i<count($ct);$i++) {
|
|
| 214 | + for ($i=0;$i<count($ct);$i++) { |
|
| 215 | 215 | echo "<option value=\"" . $ct[$i] . "\">" . $ct[$i] . "</option>"; |
| 216 | 216 | } |
| 217 | 217 | ?> |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
| 267 | 267 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
| 268 | 268 | <?php |
| 269 | - for ($i=-24; $i<25; $i++) {
|
|
| 269 | + for ($i=-24; $i<25; $i++) { |
|
| 270 | 270 | $seconds = $i*60*60; |
| 271 | 271 | $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; ?> |
| 272 | 272 | <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option> |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | <?php |
| 308 | 308 | // invoke OnSiteSettingsRender event |
| 309 | 309 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
|
| 310 | - if (is_array($evtOut)) {
|
|
| 310 | + if (is_array($evtOut)) { |
|
| 311 | 311 | echo implode("", $evtOut);
|
| 312 | 312 | } |
| 313 | 313 | ?> |
@@ -171,7 +171,7 @@ |
||
| 171 | 171 | |
| 172 | 172 | // Now sort by name |
| 173 | 173 | foreach ($this->itemsPerCategory as $catid=>$items) { |
| 174 | - usort($this->itemsPerCategory[$catid], function ($a, $b) { |
|
| 174 | + usort($this->itemsPerCategory[$catid], function ($a, $b){ |
|
| 175 | 175 | return strcasecmp($a['name'], $b['name']); |
| 176 | 176 | }); |
| 177 | 177 | } |
@@ -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 | |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * @param array $ph |
| 17 | 17 | * @return string |
| 18 | 18 | */ |
| 19 | -function parsePh($tpl, $ph) |
|
| 20 | -{
|
|
| 19 | +function parsePh($tpl, $ph) |
|
| 20 | +{ |
|
| 21 | 21 | $modx = evolutionCMS(); |
| 22 | 22 | global $_lang; |
| 23 | 23 | $tpl = $modx->parseText($tpl, $_lang, '[%', '%]'); |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | * @param string|int $cssId |
| 29 | 29 | * @return string |
| 30 | 30 | */ |
| 31 | -function renderViewSwitchButtons($cssId) |
|
| 32 | -{
|
|
| 31 | +function renderViewSwitchButtons($cssId) |
|
| 32 | +{ |
|
| 33 | 33 | $modx = evolutionCMS(); |
| 34 | 34 | global $_lang, $tpl; |
| 35 | 35 | |
@@ -43,21 +43,21 @@ discard block |
||
| 43 | 43 | * @param mgrResources $resources |
| 44 | 44 | * @return string |
| 45 | 45 | */ |
| 46 | -function createResourceList($resourceTable, $resources) |
|
| 47 | -{
|
|
| 46 | +function createResourceList($resourceTable, $resources) |
|
| 47 | +{ |
|
| 48 | 48 | $modx = evolutionCMS(); |
| 49 | 49 | global $_lang, $_style, $modx_textdir, $tpl; |
| 50 | 50 | |
| 51 | 51 | $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false; |
| 52 | 52 | |
| 53 | - if (! is_array($items) || empty($items)) {
|
|
| 53 | + if (! is_array($items) || empty($items)) { |
|
| 54 | 54 | return $_lang['no_results']; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | // Prepare elements- and categories-list |
| 58 | 58 | $elements = array(); |
| 59 | 59 | $categories = array(); |
| 60 | - foreach ($items as $row) {
|
|
| 60 | + foreach ($items as $row) { |
|
| 61 | 61 | $catid = $row['catid'] ? $row['catid'] : 0; |
| 62 | 62 | $categories[$catid] = array('name' => stripslashes($row['category']));
|
| 63 | 63 | $elements[$catid][] = prepareElementRowPh($row, $resourceTable, $resources); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | // Now render categories / panel-collapse |
| 67 | 67 | $panelGroup = ''; |
| 68 | - foreach ($elements as $catid => $elList) {
|
|
| 68 | + foreach ($elements as $catid => $elList) { |
|
| 69 | 69 | // Add panel-heading / category-collapse to output |
| 70 | 70 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
| 71 | 71 | 'tab' => $resourceTable, |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | // Prepare content for panel-collapse |
| 78 | 78 | $panelCollapse = ''; |
| 79 | - foreach ($elList as $el) {
|
|
| 79 | + foreach ($elList as $el) { |
|
| 80 | 80 | $panelCollapse .= parsePh($tpl['elementsRow'], $el); |
| 81 | 81 | } |
| 82 | 82 | |
@@ -98,8 +98,8 @@ discard block |
||
| 98 | 98 | * @param mgrResources $resources |
| 99 | 99 | * @return string |
| 100 | 100 | */ |
| 101 | -function createCombinedView($resources) |
|
| 102 | -{
|
|
| 101 | +function createCombinedView($resources) |
|
| 102 | +{ |
|
| 103 | 103 | $modx = evolutionCMS(); |
| 104 | 104 | global $_lang, $_style, $modx_textdir; |
| 105 | 105 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $types = isset($resources->types) ? $resources->types : false; |
| 108 | 108 | $categories = isset($resources->categories) ? $resources->categories : false; |
| 109 | 109 | |
| 110 | - if (!$itemsPerCategory) {
|
|
| 110 | + if (!$itemsPerCategory) { |
|
| 111 | 111 | return $_lang['no_results']; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -120,10 +120,10 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | // Easily loop through $itemsPerCategory-Array |
| 122 | 122 | $panelGroup = ''; |
| 123 | - foreach ($categories as $catid => $category) {
|
|
| 123 | + foreach ($categories as $catid => $category) { |
|
| 124 | 124 | // Prepare collapse content / elements-list |
| 125 | 125 | $panelCollapse = ''; |
| 126 | - foreach ($itemsPerCategory[$catid] as $el) {
|
|
| 126 | + foreach ($itemsPerCategory[$catid] as $el) { |
|
| 127 | 127 | $resourceTable = $el['type']; |
| 128 | 128 | $ph = prepareElementRowPh($el, $resourceTable, $resources); |
| 129 | 129 | $panelCollapse .= parsePh($tpl['elementsRow'], $ph); |
@@ -157,8 +157,8 @@ discard block |
||
| 157 | 157 | * @param mgrResources $resources |
| 158 | 158 | * @return array |
| 159 | 159 | */ |
| 160 | -function prepareElementRowPh($row, $resourceTable, $resources) |
|
| 161 | -{
|
|
| 160 | +function prepareElementRowPh($row, $resourceTable, $resources) |
|
| 161 | +{ |
|
| 162 | 162 | $modx = evolutionCMS(); |
| 163 | 163 | global $modx_textdir, $_style, $_lang; |
| 164 | 164 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | $_lang["confirm_delete"] = $_lang["delete"]; |
| 168 | 168 | |
| 169 | - switch ($resourceTable) {
|
|
| 169 | + switch ($resourceTable) { |
|
| 170 | 170 | case 'site_templates': |
| 171 | 171 | $class = $row['selectable'] ? '' : 'disabledPlugin'; |
| 172 | 172 | $lockElementType = 1; |
@@ -203,56 +203,56 @@ discard block |
||
| 203 | 203 | // Prepare displaying user-locks |
| 204 | 204 | $lockedByUser = ''; |
| 205 | 205 | $rowLock = $modx->elementIsLocked($lockElementType, $row['id'], true); |
| 206 | - if ($rowLock && $modx->hasPermission('display_locks')) {
|
|
| 207 | - if ($rowLock['sid'] == $modx->sid) {
|
|
| 206 | + if ($rowLock && $modx->hasPermission('display_locks')) { |
|
| 207 | + if ($rowLock['sid'] == $modx->sid) { |
|
| 208 | 208 | $title = $modx->parseText($_lang["lock_element_editing"], array( |
| 209 | 209 | 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
| 210 | 210 | 'lasthit_df' => $rowLock['lasthit_df'] |
| 211 | 211 | )); |
| 212 | 212 | $lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span> '; |
| 213 | - } else {
|
|
| 213 | + } else { |
|
| 214 | 214 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
| 215 | 215 | 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
| 216 | 216 | 'username' => $rowLock['username'], |
| 217 | 217 | 'lasthit_df' => $rowLock['lasthit_df'] |
| 218 | 218 | )); |
| 219 | - if ($modx->hasPermission('remove_locks')) {
|
|
| 219 | + if ($modx->hasPermission('remove_locks')) { |
|
| 220 | 220 | $lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>';
|
| 221 | - } else {
|
|
| 221 | + } else { |
|
| 222 | 222 | $lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>'; |
| 223 | 223 | } |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | - if ($lockedByUser) {
|
|
| 226 | + if ($lockedByUser) { |
|
| 227 | 227 | $lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>'; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | // Caption |
| 231 | - if ($resourceTable == 'site_tmplvars') {
|
|
| 231 | + if ($resourceTable == 'site_tmplvars') { |
|
| 232 | 232 | $caption = !empty($row['description']) ? ' ' . $row['caption'] . ' <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption'];
|
| 233 | - } else {
|
|
| 233 | + } else { |
|
| 234 | 234 | $caption = !empty($row['description']) ? ' ' . $row['description'] : ''; |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | // Special marks |
| 238 | 238 | $tplInfo = array(); |
| 239 | - if ($row['locked']) {
|
|
| 239 | + if ($row['locked']) { |
|
| 240 | 240 | $tplInfo[] = $_lang['locked']; |
| 241 | 241 | } |
| 242 | - if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') {
|
|
| 242 | + if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
|
| 243 | 243 | $tplInfo[] = $_lang['defaulttemplate_title']; |
| 244 | 244 | } |
| 245 | 245 | $marks = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : '';
|
| 246 | 246 | |
| 247 | 247 | /* row buttons */ |
| 248 | 248 | $buttons = ''; |
| 249 | - if ($modx->hasPermission($types['actions']['edit'][1])) {
|
|
| 249 | + if ($modx->hasPermission($types['actions']['edit'][1])) { |
|
| 250 | 250 | $buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>'; |
| 251 | 251 | } |
| 252 | - if ($modx->hasPermission($types['actions']['duplicate'][1])) {
|
|
| 252 | + if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
|
| 253 | 253 | $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>'; |
| 254 | 254 | } |
| 255 | - if ($modx->hasPermission($types['actions']['remove'][1])) {
|
|
| 255 | + if ($modx->hasPermission($types['actions']['remove'][1])) { |
|
| 256 | 256 | $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>'; |
| 257 | 257 | } |
| 258 | 258 | $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : ''; |
@@ -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('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) {
|
|
| 5 | +if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -10,10 +10,10 @@ discard block |
||
| 10 | 10 | $modx->manager->initPageViewState(); |
| 11 | 11 | |
| 12 | 12 | // get and save search string |
| 13 | -if ($_REQUEST['op'] == 'reset') {
|
|
| 13 | +if ($_REQUEST['op'] == 'reset') { |
|
| 14 | 14 | $query = ''; |
| 15 | 15 | $_PAGE['vs']['search'] = ''; |
| 16 | -} else {
|
|
| 16 | +} else { |
|
| 17 | 17 | $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
| 18 | 18 | $sqlQuery = $modx->db->escape($query); |
| 19 | 19 | $_PAGE['vs']['search'] = $query; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
| 29 | 29 | $cm = new ContextMenu("cntxm", 150);
|
| 30 | 30 | $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0));
|
| 31 | -if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
|
|
| 31 | +if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
| 32 | 32 | $cm->addSeparator(); |
| 33 | 33 | } |
| 34 | 34 | $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['actions_edit'], (!$modx->hasPermission('edit_module') ? 1 : 0));
|
@@ -107,21 +107,21 @@ discard block |
||
| 107 | 107 | <div class="tab-page"> |
| 108 | 108 | <div class="table-responsive"> |
| 109 | 109 | <?php |
| 110 | - if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
|
|
| 110 | + if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
| 111 | 111 | $rs = $modx->db->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon
|
| 112 | 112 | FROM ' . $modx->getFullTableName('site_modules') . ' AS sm
|
| 113 | 113 | LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
|
| 114 | 114 | LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
|
| 115 | 115 | WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
| 116 | 116 | ORDER BY sm.name'); |
| 117 | - if ($modx->hasPermission('edit_module')) {
|
|
| 117 | + if ($modx->hasPermission('edit_module')) { |
|
| 118 | 118 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
| 119 | - } elseif ($modx->hasPermission('exec_module')) {
|
|
| 119 | + } elseif ($modx->hasPermission('exec_module')) { |
|
| 120 | 120 | $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
| 121 | - } else {
|
|
| 121 | + } else { |
|
| 122 | 122 | $title = '[+value+]'; |
| 123 | 123 | } |
| 124 | - } else {
|
|
| 124 | + } else { |
|
| 125 | 125 | $rs = $modx->db->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name");
|
| 126 | 126 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
| 127 | 127 | } |
@@ -137,10 +137,10 @@ discard block |
||
| 137 | 137 | $grd->colWidths = "34,,,60,60"; |
| 138 | 138 | $grd->colAligns = "center,,,center,center"; |
| 139 | 139 | $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title; |
| 140 | - if ($listmode == '1') {
|
|
| 140 | + if ($listmode == '1') { |
|
| 141 | 141 | $grd->pageSize = 0; |
| 142 | 142 | } |
| 143 | - if ($_REQUEST['op'] == 'reset') {
|
|
| 143 | + if ($_REQUEST['op'] == 'reset') { |
|
| 144 | 144 | $grd->pageNumber = 1; |
| 145 | 145 | } |
| 146 | 146 | // render grid |
@@ -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('logs')) {
|
|
| 5 | +if (!$modx->hasPermission('logs')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | <table class="table data table-sm nowrap"> |
| 56 | 56 | <tbody> |
| 57 | 57 | <?php |
| 58 | - foreach ($serverArr as $key => $value) {
|
|
| 58 | + foreach ($serverArr as $key => $value) { |
|
| 59 | 59 | ?> |
| 60 | 60 | <tr> |
| 61 | 61 | <td width="1%"><?= $key ?></td> |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $sql = "SHOW TABLE STATUS FROM $dbase LIKE '" . $modx->db->escape($modx->db->config['table_prefix']) . "%';"; |
| 99 | 99 | $rs = $modx->db->query($sql); |
| 100 | 100 | $i = 0; |
| 101 | - while ($log_status = $modx->db->getRow($rs)) {
|
|
| 101 | + while ($log_status = $modx->db->getRow($rs)) { |
|
| 102 | 102 | ?> |
| 103 | 103 | <tr> |
| 104 | 104 | <td class="text-primary"><b><?= $log_status['Name'] ?></b></td> |
@@ -110,17 +110,17 @@ discard block |
||
| 110 | 110 | $modx->db->config['table_prefix'] . 'event_log', |
| 111 | 111 | $modx->db->config['table_prefix'] . 'manager_log', |
| 112 | 112 | ); |
| 113 | - if ($modx->hasPermission('settings') && in_array($log_status['Name'], $truncateable)) {
|
|
| 113 | + if ($modx->hasPermission('settings') && in_array($log_status['Name'], $truncateable)) { |
|
| 114 | 114 | echo "<td class=\"text-xs-right\">"; |
| 115 | 115 | echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=" . $log_status['Name'] . "' title='" . $_lang['truncate_table'] . "'>" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</a>"; |
| 116 | 116 | echo "</td>"; |
| 117 | - } else {
|
|
| 117 | + } else { |
|
| 118 | 118 | echo "<td class=\"text-xs-right\">" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</td>"; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - if ($modx->hasPermission('settings')) {
|
|
| 121 | + if ($modx->hasPermission('settings')) { |
|
| 122 | 122 | echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=" . $log_status['Name'] . "' title='" . $_lang['optimize_table'] . "' ><span>" . $modx->nicesize($log_status['Data_free']) . "</span></a>" : "-") . "</td>"; |
| 123 | - } else {
|
|
| 123 | + } else { |
|
| 124 | 124 | echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-") . "</td>"; |
| 125 | 125 | } ?> |
| 126 | 126 | <td class="text-xs-right"><?= $modx->nicesize($log_status['Data_length'] - $log_status['Data_free']) ?></td> |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | </table> |
| 144 | 144 | </div> |
| 145 | 145 | </div> |
| 146 | - <?php if ($totaloverhead > 0) {
|
|
| 146 | + <?php if ($totaloverhead > 0) { |
|
| 147 | 147 | ?> |
| 148 | 148 | <br> |
| 149 | 149 | <p class="alert alert-danger"><?= $_lang['database_overhead'] ?></p> |
@@ -478,7 +478,8 @@ discard block |
||
| 478 | 478 | return s; |
| 479 | 479 | } |
| 480 | 480 | |
| 481 | - <?php if ($content['type'] == 'reference' || $modx->manager->action == '72') { // Web Link specific?> |
|
| 481 | + <?php if ($content['type'] == 'reference' || $modx->manager->action == '72') { |
|
| 482 | +// Web Link specific?> |
|
| 482 | 483 | var lastImageCtrl; |
| 483 | 484 | var lastFileCtrl; |
| 484 | 485 | |
@@ -695,7 +696,8 @@ discard block |
||
| 695 | 696 | </td> |
| 696 | 697 | </tr> |
| 697 | 698 | |
| 698 | - <?php if ($content['type'] == 'reference' || $modx->manager->action == '72') { // Web Link specific?> |
|
| 699 | + <?php if ($content['type'] == 'reference' || $modx->manager->action == '72') { |
|
| 700 | +// Web Link specific?> |
|
| 699 | 701 | |
| 700 | 702 | <tr> |
| 701 | 703 | <td><span class="warning"><?= $_lang['weblink'] ?></span> |
@@ -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('view_eventlog')) {
|
|
| 5 | +if (!$modx->hasPermission('view_eventlog')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | ?> |
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | <?php |
| 20 | 20 | $rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC');
|
| 21 | 21 | $limit = $modx->db->getRecordCount($rs); |
| 22 | - if ($limit < 1) {
|
|
| 22 | + if ($limit < 1) { |
|
| 23 | 23 | ?> |
| 24 | 24 | <p><?= $_lang["no_docs_pending_publishing"] ?></p> |
| 25 | 25 | <?php |
| 26 | - } else {
|
|
| 26 | + } else { |
|
| 27 | 27 | ?> |
| 28 | 28 | <div class="table-responsive"> |
| 29 | 29 | <table class="grid sortabletable" id="table-1"> |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | </thead> |
| 37 | 37 | <tbody> |
| 38 | 38 | <?php |
| 39 | - while ($row = $modx->db->getRow($rs)) {
|
|
| 39 | + while ($row = $modx->db->getRow($rs)) { |
|
| 40 | 40 | ?> |
| 41 | 41 | <tr> |
| 42 | 42 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | <?php |
| 58 | 58 | $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC');
|
| 59 | 59 | $limit = $modx->db->getRecordCount($rs); |
| 60 | - if ($limit < 1) {
|
|
| 60 | + if ($limit < 1) { |
|
| 61 | 61 | ?> |
| 62 | 62 | <p><?= $_lang["no_docs_pending_unpublishing"] ?></p> |
| 63 | 63 | <?php |
| 64 | - } else {
|
|
| 64 | + } else { |
|
| 65 | 65 | ?> |
| 66 | 66 | <div class="table-responsive"> |
| 67 | 67 | <table class="grid sortabletable" id="table-2"> |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | </thead> |
| 75 | 75 | <tbody> |
| 76 | 76 | <?php |
| 77 | - while ($row = $modx->db->getRow($rs)) {
|
|
| 77 | + while ($row = $modx->db->getRow($rs)) { |
|
| 78 | 78 | ?> |
| 79 | 79 | <tr> |
| 80 | 80 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -95,11 +95,11 @@ discard block |
||
| 95 | 95 | <?php |
| 96 | 96 | $rs = $modx->db->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC");
|
| 97 | 97 | $limit = $modx->db->getRecordCount($rs); |
| 98 | - if ($limit < 1) {
|
|
| 98 | + if ($limit < 1) { |
|
| 99 | 99 | ?> |
| 100 | 100 | <p><?= $_lang["no_docs_pending_pubunpub"] ?></p> |
| 101 | 101 | <?php |
| 102 | - } else {
|
|
| 102 | + } else { |
|
| 103 | 103 | ?> |
| 104 | 104 | <div class="table-responsive"> |
| 105 | 105 | <table class="grid sortabletable" id="table-3"> |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | </thead> |
| 114 | 114 | <tbody> |
| 115 | 115 | <?php |
| 116 | - while ($row = $modx->db->getRow($rs)) {
|
|
| 116 | + while ($row = $modx->db->getRow($rs)) { |
|
| 117 | 117 | ?> |
| 118 | 118 | <tr> |
| 119 | 119 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -1,11 +1,11 @@ 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 | 6 | unset($_SESSION['itemname']); // clear this, because it's only set for logging purposes |
| 7 | 7 | |
| 8 | -if ($modx->hasPermission('settings') && (!isset($settings_version) || $settings_version != $modx->getVersionData('version'))) {
|
|
| 8 | +if ($modx->hasPermission('settings') && (!isset($settings_version) || $settings_version != $modx->getVersionData('version'))) { |
|
| 9 | 9 | // seems to be a new install - send the user to the configuration page |
| 10 | 10 | exit('<script type="text/javascript">document.location.href="index.php?a=17";</script>');
|
| 11 | 11 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $_SESSION['nrnewmessages'] = 0; |
| 17 | 17 | |
| 18 | 18 | // setup message info |
| 19 | -if ($modx->hasPermission('messages')) {
|
|
| 19 | +if ($modx->hasPermission('messages')) { |
|
| 20 | 20 | include_once(MODX_MANAGER_PATH . 'includes/messageCount.inc.php'); |
| 21 | 21 | $_SESSION['nrtotalmessages'] = $nrtotalmessages; |
| 22 | 22 | $_SESSION['nrnewmessages'] = $nrnewmessages; |
@@ -32,46 +32,46 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | // setup icons |
| 35 | -if ($modx->hasPermission('new_user') || $modx->hasPermission('edit_user')) {
|
|
| 35 | +if ($modx->hasPermission('new_user') || $modx->hasPermission('edit_user')) { |
|
| 36 | 36 | $icon = '<i class="[&icons_security_large&]" alt="[%user_management_title%]"> </i>[%user_management_title%]'; |
| 37 | 37 | $ph['SecurityIcon'] = wrapIcon($icon, 75); |
| 38 | 38 | } |
| 39 | -if ($modx->hasPermission('new_web_user') || $modx->hasPermission('edit_web_user')) {
|
|
| 39 | +if ($modx->hasPermission('new_web_user') || $modx->hasPermission('edit_web_user')) { |
|
| 40 | 40 | $icon = '<i class="[&icons_webusers_large&]" alt="[%web_user_management_title%]"> </i>[%web_user_management_title%]'; |
| 41 | 41 | $ph['WebUserIcon'] = wrapIcon($icon, 99); |
| 42 | 42 | } |
| 43 | -if ($modx->hasPermission('new_module') || $modx->hasPermission('edit_module')) {
|
|
| 43 | +if ($modx->hasPermission('new_module') || $modx->hasPermission('edit_module')) { |
|
| 44 | 44 | $icon = '<i class="[&icons_modules_large&]" alt="[%manage_modules%]"> </i>[%modules%]'; |
| 45 | 45 | $ph['ModulesIcon'] = wrapIcon($icon, 106); |
| 46 | 46 | } |
| 47 | -if ($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) {
|
|
| 47 | +if ($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) { |
|
| 48 | 48 | $icon = '<i class="[&icons_resources_large&]" alt="[%element_management%]"> </i>[%elements%]'; |
| 49 | 49 | $ph['ResourcesIcon'] = wrapIcon($icon, 76); |
| 50 | 50 | } |
| 51 | -if ($modx->hasPermission('bk_manager')) {
|
|
| 51 | +if ($modx->hasPermission('bk_manager')) { |
|
| 52 | 52 | $icon = '<i class="[&icons_backup_large&]" alt="[%bk_manager%]"> </i>[%backup%]'; |
| 53 | 53 | $ph['BackupIcon'] = wrapIcon($icon, 93); |
| 54 | 54 | } |
| 55 | -if ($modx->hasPermission('help')) {
|
|
| 55 | +if ($modx->hasPermission('help')) { |
|
| 56 | 56 | $icon = '<i class="[&icons_help_large&]" alt="[%help%]" /> </i>[%help%]'; |
| 57 | 57 | $ph['HelpIcon'] = wrapIcon($icon, 9); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | -if ($modx->hasPermission('new_document')) {
|
|
| 60 | +if ($modx->hasPermission('new_document')) { |
|
| 61 | 61 | $icon = '<i class="[&icons_resource_large&]"></i>[%add_resource%]'; |
| 62 | 62 | $ph['ResourceIcon'] = wrapIcon($icon, 4); |
| 63 | 63 | $icon = '<i class="[&icons_weblink_large&]"></i>[%add_weblink%]'; |
| 64 | 64 | $ph['WeblinkIcon'] = wrapIcon($icon, 72); |
| 65 | 65 | } |
| 66 | -if ($modx->hasPermission('assets_images')) {
|
|
| 66 | +if ($modx->hasPermission('assets_images')) { |
|
| 67 | 67 | $icon = '<i class="[&icons_images_large&]"></i>[%images_management%]'; |
| 68 | 68 | $ph['ImagesIcon'] = wrapIcon($icon, 72); |
| 69 | 69 | } |
| 70 | -if ($modx->hasPermission('assets_files')) {
|
|
| 70 | +if ($modx->hasPermission('assets_files')) { |
|
| 71 | 71 | $icon = '<i class="[&icons_files_large&]"></i>[%files_management%]'; |
| 72 | 72 | $ph['FilesIcon'] = wrapIcon($icon, 72); |
| 73 | 73 | } |
| 74 | -if ($modx->hasPermission('change_password')) {
|
|
| 74 | +if ($modx->hasPermission('change_password')) { |
|
| 75 | 75 | $icon = '<i class="[&icons_password_large&]"></i>[%change_password%]'; |
| 76 | 76 | $ph['PasswordIcon'] = wrapIcon($icon, 28); |
| 77 | 77 | } |
@@ -79,21 +79,21 @@ discard block |
||
| 79 | 79 | $ph['LogoutIcon'] = wrapIcon($icon, 8); |
| 80 | 80 | |
| 81 | 81 | // do some config checks |
| 82 | -if (($modx->config['warning_visibility'] == 0 && $_SESSION['mgrRole'] == 1) || $modx->config['warning_visibility'] == 1) {
|
|
| 82 | +if (($modx->config['warning_visibility'] == 0 && $_SESSION['mgrRole'] == 1) || $modx->config['warning_visibility'] == 1) { |
|
| 83 | 83 | include_once(MODX_MANAGER_PATH . 'includes/config_check.inc.php'); |
| 84 | - if ($config_check_results != $_lang['configcheck_ok']) {
|
|
| 84 | + if ($config_check_results != $_lang['configcheck_ok']) { |
|
| 85 | 85 | $ph['config_check_results'] = $config_check_results; |
| 86 | 86 | $ph['config_display'] = 'block'; |
| 87 | - } else {
|
|
| 87 | + } else { |
|
| 88 | 88 | $ph['config_display'] = 'none'; |
| 89 | 89 | } |
| 90 | -} else {
|
|
| 90 | +} else { |
|
| 91 | 91 | $ph['config_display'] = 'none'; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | // Check logout-reminder |
| 95 | -if (isset($_SESSION['show_logout_reminder'])) {
|
|
| 96 | - switch ($_SESSION['show_logout_reminder']['type']) {
|
|
| 95 | +if (isset($_SESSION['show_logout_reminder'])) { |
|
| 96 | + switch ($_SESSION['show_logout_reminder']['type']) { |
|
| 97 | 97 | case 'logout_reminder': |
| 98 | 98 | $date = $modx->toDateFormat($_SESSION['show_logout_reminder']['lastHit'], 'dateOnly'); |
| 99 | 99 | $ph['logout_reminder_msg'] = str_replace('[+date+]', $date, $_lang['logout_reminder_msg']);
|
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | $ph['show_logout_reminder'] = 'block'; |
| 103 | 103 | unset($_SESSION['show_logout_reminder']); |
| 104 | -} else {
|
|
| 104 | +} else { |
|
| 105 | 105 | $ph['show_logout_reminder'] = 'none'; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -162,9 +162,9 @@ discard block |
||
| 162 | 162 | $from[] = " us LEFT JOIN [+prefix+]active_users au ON au.sid=us.sid WHERE au.action <> '8'"; |
| 163 | 163 | $rs = $modx->db->select('*', $from, '', 'username ASC, au.sid ASC');
|
| 164 | 164 | |
| 165 | -if ($modx->db->getRecordCount($rs) < 1) {
|
|
| 165 | +if ($modx->db->getRecordCount($rs) < 1) { |
|
| 166 | 166 | $html = '<p>[%no_active_users_found%]</p>'; |
| 167 | -} else {
|
|
| 167 | +} else { |
|
| 168 | 168 | include_once(MODX_MANAGER_PATH . 'includes/actionlist.inc.php'); |
| 169 | 169 | $now = $_SERVER['REQUEST_TIME'] + $server_offset_time; |
| 170 | 170 | $ph['now'] = strftime('%H:%M:%S', $now);
|
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $userList = array(); |
| 191 | 191 | $userCount = array(); |
| 192 | 192 | // Create userlist with session-count first before output |
| 193 | - while ($activeusers = $modx->db->getRow($rs)) {
|
|
| 193 | + while ($activeusers = $modx->db->getRow($rs)) { |
|
| 194 | 194 | $userCount[$activeusers['internalKey']] = isset($userCount[$activeusers['internalKey']]) ? $userCount[$activeusers['internalKey']] + 1 : 1; |
| 195 | 195 | |
| 196 | 196 | $idle = $activeusers['lasthit'] < $timetocheck ? ' class="userIdle"' : ''; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | $currentaction |
| 209 | 209 | ); |
| 210 | 210 | } |
| 211 | - foreach ($userList as $params) {
|
|
| 211 | + foreach ($userList as $params) { |
|
| 212 | 212 | $params[1] = $userCount[$params[4]] > 1 ? ' class="userMultipleSessions"' : ''; |
| 213 | 213 | $html .= "\n\t\t" . vsprintf('<tr%s><td><strong%s>%s</strong></td><td>%s%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $params);
|
| 214 | 214 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | // invoke event OnManagerWelcomePrerender |
| 255 | 255 | $evtOut = $modx->invokeEvent('OnManagerWelcomePrerender');
|
| 256 | -if (is_array($evtOut)) {
|
|
| 256 | +if (is_array($evtOut)) { |
|
| 257 | 257 | $output = implode('', $evtOut);
|
| 258 | 258 | $ph['OnManagerWelcomePrerender'] = $output; |
| 259 | 259 | } |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | 'body' => '<div class="widget-stage">[+RecentInfo+]</div>', |
| 359 | 359 | 'hide'=>'0' |
| 360 | 360 | ); |
| 361 | -if ($modx->config['rss_url_news']) {
|
|
| 361 | +if ($modx->config['rss_url_news']) { |
|
| 362 | 362 | $widgets['news'] = array( |
| 363 | 363 | 'menuindex' => '40', |
| 364 | 364 | 'id' => 'news', |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | 'hide'=>'0' |
| 370 | 370 | ); |
| 371 | 371 | } |
| 372 | -if ($modx->config['rss_url_security']) {
|
|
| 372 | +if ($modx->config['rss_url_security']) { |
|
| 373 | 373 | $widgets['security'] = array( |
| 374 | 374 | 'menuindex' => '50', |
| 375 | 375 | 'id' => 'security', |
@@ -383,29 +383,29 @@ discard block |
||
| 383 | 383 | |
| 384 | 384 | // invoke OnManagerWelcomeHome event |
| 385 | 385 | $sitewidgets = $modx->invokeEvent("OnManagerWelcomeHome", array('widgets' => $widgets));
|
| 386 | -if (is_array($sitewidgets)) {
|
|
| 386 | +if (is_array($sitewidgets)) { |
|
| 387 | 387 | $newwidgets = array(); |
| 388 | - foreach ($sitewidgets as $widget) {
|
|
| 388 | + foreach ($sitewidgets as $widget) { |
|
| 389 | 389 | $newwidgets = array_merge($newwidgets, unserialize($widget)); |
| 390 | 390 | } |
| 391 | 391 | $widgets = (count($newwidgets) > 0) ? $newwidgets : $widgets; |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | -usort($widgets, function ($a, $b) {
|
|
| 394 | +usort($widgets, function ($a, $b){ |
|
| 395 | 395 | return $a['menuindex'] - $b['menuindex']; |
| 396 | 396 | }); |
| 397 | 397 | |
| 398 | 398 | $tpl = getTplWidget(); |
| 399 | 399 | $output = ''; |
| 400 | -foreach ($widgets as $widget) {
|
|
| 401 | - if ($widget['hide'] != '1') {
|
|
| 400 | +foreach ($widgets as $widget) { |
|
| 401 | + if ($widget['hide'] != '1') { |
|
| 402 | 402 | $output .= $modx->parseText($tpl, $widget); |
| 403 | 403 | } |
| 404 | 404 | } |
| 405 | 405 | $ph['widgets'] = $output; |
| 406 | 406 | |
| 407 | 407 | // load template |
| 408 | -if (!isset($modx->config['manager_welcome_tpl']) || empty($modx->config['manager_welcome_tpl'])) {
|
|
| 408 | +if (!isset($modx->config['manager_welcome_tpl']) || empty($modx->config['manager_welcome_tpl'])) { |
|
| 409 | 409 | $modx->config['manager_welcome_tpl'] = MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'; |
| 410 | 410 | } |
| 411 | 411 | |
@@ -413,26 +413,27 @@ discard block |
||
| 413 | 413 | $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target);
|
| 414 | 414 | $target = $modx->mergeSettingsContent($target); |
| 415 | 415 | |
| 416 | -if (substr($target, 0, 1) === '@') {
|
|
| 417 | - if (substr($target, 0, 6) === '@CHUNK') {
|
|
| 416 | +if (substr($target, 0, 1) === '@') { |
|
| 417 | + if (substr($target, 0, 6) === '@CHUNK') { |
|
| 418 | 418 | $content = $modx->getChunk(trim(substr($target, 7))); |
| 419 | - } elseif (substr($target, 0, 5) === '@FILE') {
|
|
| 419 | + } elseif (substr($target, 0, 5) === '@FILE') { |
|
| 420 | 420 | $content = file_get_contents(trim(substr($target, 6))); |
| 421 | - } else {
|
|
| 421 | + } else { |
|
| 422 | 422 | $content = ''; |
| 423 | 423 | } |
| 424 | -} else {
|
|
| 424 | +} else { |
|
| 425 | 425 | $chunk = $modx->getChunk($target); |
| 426 | - if ($chunk !== false && !empty($chunk)) {
|
|
| 426 | + if ($chunk !== false && !empty($chunk)) { |
|
| 427 | 427 | $content = $chunk; |
| 428 | - } elseif (is_file(MODX_BASE_PATH . $target)) {
|
|
| 428 | + } elseif (is_file(MODX_BASE_PATH . $target)) { |
|
| 429 | 429 | $content = file_get_contents(MODX_BASE_PATH . $target); |
| 430 | - } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl')) {
|
|
| 430 | + } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl')) { |
|
| 431 | 431 | $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl'); |
| 432 | - } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html')) { // ClipperCMS compatible |
|
| 432 | + } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html')) { |
|
| 433 | +// ClipperCMS compatible |
|
| 433 | 434 | |
| 434 | 435 | $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html'); |
| 435 | - } else {
|
|
| 436 | + } else { |
|
| 436 | 437 | $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'); |
| 437 | 438 | } |
| 438 | 439 | } |
@@ -441,7 +442,7 @@ discard block |
||
| 441 | 442 | $content = $modx->mergeConditionalTagsContent($content); |
| 442 | 443 | $content = $modx->mergeSettingsContent($content); |
| 443 | 444 | $content = $modx->parseText($content, $ph); |
| 444 | -if (strpos($content, '[+') !== false) {
|
|
| 445 | +if (strpos($content, '[+') !== false) { |
|
| 445 | 446 | $modx->toPlaceholders($ph); |
| 446 | 447 | $content = $modx->mergePlaceholderContent($content); |
| 447 | 448 | } |
@@ -450,7 +451,7 @@ discard block |
||
| 450 | 451 | $content = $modx->parseText($content, $_style, '[&', '&]'); |
| 451 | 452 | $content = $modx->cleanUpMODXTags($content); //cleanup |
| 452 | 453 | |
| 453 | -if ($js = $modx->getRegisteredClientScripts()) {
|
|
| 454 | +if ($js = $modx->getRegisteredClientScripts()) { |
|
| 454 | 455 | $content .= $js; |
| 455 | 456 | } |
| 456 | 457 | |
@@ -460,8 +461,9 @@ discard block |
||
| 460 | 461 | // <a href="javascript:;" class="setting"><i class="fa fa-cog"></i></a> |
| 461 | 462 | // <a href="javascript:;" class="closed"><i class="fa fa-close"></i></a> |
| 462 | 463 | //</span> |
| 463 | -function getTplWidget() |
|
| 464 | -{ // recent document info
|
|
| 464 | +function getTplWidget() |
|
| 465 | +{ |
|
| 466 | +// recent document info |
|
| 465 | 467 | return ' |
| 466 | 468 | <div class="[+cols+]" id="[+id+]"> |
| 467 | 469 | <div class="card"[+cardAttr+]> |
@@ -472,8 +474,9 @@ discard block |
||
| 472 | 474 | '; |
| 473 | 475 | } |
| 474 | 476 | |
| 475 | -function getRecentInfo() |
|
| 476 | -{ // recent document info
|
|
| 477 | +function getRecentInfo() |
|
| 478 | +{ |
|
| 479 | +// recent document info |
|
| 477 | 480 | $modx = evolutionCMS(); |
| 478 | 481 | |
| 479 | 482 | $modx->addSnippet('recentInfoList', 'getRecentInfoList');
|
@@ -499,13 +502,13 @@ discard block |
||
| 499 | 502 | return $html; |
| 500 | 503 | } |
| 501 | 504 | |
| 502 | -function getRecentInfoList() |
|
| 503 | -{
|
|
| 505 | +function getRecentInfoList() |
|
| 506 | +{ |
|
| 504 | 507 | $modx = evolutionCMS(); |
| 505 | 508 | |
| 506 | 509 | $rs = $modx->db->select('*', '[+prefix+]site_content', '', 'editedon DESC', 10);
|
| 507 | 510 | |
| 508 | - if ($modx->db->getRecordCount($rs) < 1) {
|
|
| 511 | + if ($modx->db->getRecordCount($rs) < 1) { |
|
| 509 | 512 | return '<tr><td>[%no_activity_message%]</td></tr>'; |
| 510 | 513 | } |
| 511 | 514 | |
@@ -515,22 +518,22 @@ discard block |
||
| 515 | 518 | $btntpl['preview_btn'] = '<a [+preview_disabled+]" title="[%preview_resource%]" target="_blank" href="../index.php?&id=[+id+]"><i class="fa fa-eye fa-fw"></i></a> '; |
| 516 | 519 | |
| 517 | 520 | $output = array(); |
| 518 | - while ($ph = $modx->db->getRow($rs)) {
|
|
| 521 | + while ($ph = $modx->db->getRow($rs)) { |
|
| 519 | 522 | $docid = $ph['id']; |
| 520 | 523 | $_ = $modx->getUserInfo($ph['editedby']); |
| 521 | 524 | $ph['username'] = $_['username']; |
| 522 | 525 | |
| 523 | - if ($ph['deleted'] == 1) {
|
|
| 526 | + if ($ph['deleted'] == 1) { |
|
| 524 | 527 | $ph['status'] = 'deleted text-danger'; |
| 525 | - } elseif ($ph['published'] == 0) {
|
|
| 528 | + } elseif ($ph['published'] == 0) { |
|
| 526 | 529 | $ph['status'] = 'unpublished font-italic text-muted'; |
| 527 | - } else {
|
|
| 530 | + } else { |
|
| 528 | 531 | $ph['status'] = 'published'; |
| 529 | 532 | } |
| 530 | 533 | |
| 531 | - if ($modx->hasPermission('edit_document')) {
|
|
| 534 | + if ($modx->hasPermission('edit_document')) { |
|
| 532 | 535 | $ph['edit_btn'] = str_replace('[+id+]', $docid, $btntpl['edit']);
|
| 533 | - } else {
|
|
| 536 | + } else { |
|
| 534 | 537 | $ph['edit_btn'] = ''; |
| 535 | 538 | } |
| 536 | 539 | |
@@ -543,40 +546,40 @@ discard block |
||
| 543 | 546 | $preview_disabled |
| 544 | 547 | ), $btntpl['preview_btn']); |
| 545 | 548 | |
| 546 | - if ($modx->hasPermission('delete_document')) {
|
|
| 547 | - if ($ph['deleted'] == 0) {
|
|
| 549 | + if ($modx->hasPermission('delete_document')) { |
|
| 550 | + if ($ph['deleted'] == 0) { |
|
| 548 | 551 | $delete_btn = '<a onclick="return confirm(\'[%confirm_delete_record%]\')" title="[%delete_resource%]" href="index.php?a=6&id=[+id+]" target="main"><i class="fa fa-trash fa-fw"></i></a> '; |
| 549 | - } else {
|
|
| 552 | + } else { |
|
| 550 | 553 | $delete_btn = '<a onclick="return confirm(\'[%confirm_undelete%]\')" title="[%undelete_resource%]" href="index.php?a=63&id=[+id+]" target="main"><i class="fa fa-arrow-circle-o-up fa-fw"></i></a> '; |
| 551 | 554 | } |
| 552 | 555 | $ph['delete_btn'] = str_replace('[+id+]', $docid, $delete_btn);
|
| 553 | - } else {
|
|
| 556 | + } else { |
|
| 554 | 557 | $ph['delete_btn'] = ''; |
| 555 | 558 | } |
| 556 | 559 | |
| 557 | - if ($ph['deleted'] == 1 && $ph['published'] == 0) {
|
|
| 560 | + if ($ph['deleted'] == 1 && $ph['published'] == 0) { |
|
| 558 | 561 | $publish_btn = '<a class="disabled" title="[%publish_resource%]" href="index.php?a=61&id=[+id+]" target="main"><i class="fa fa-arrow-up fa-fw"></i></a> '; |
| 559 | - } elseif ($ph['deleted'] == 1 && $ph['published'] == 1) {
|
|
| 562 | + } elseif ($ph['deleted'] == 1 && $ph['published'] == 1) { |
|
| 560 | 563 | $publish_btn = '<a class="disabled" title="[%publish_resource%]" href="index.php?a=61&id=[+id+]" target="main"><i class="fa fa-arrow-down fa-fw"></i></a> '; |
| 561 | - } elseif ($ph['deleted'] == 0 && $ph['published'] == 0) {
|
|
| 564 | + } elseif ($ph['deleted'] == 0 && $ph['published'] == 0) { |
|
| 562 | 565 | $publish_btn = '<a title="[%publish_resource%]" href="index.php?a=61&id=[+id+]" target="main"><i class="fa fa-arrow-up fa-fw"></i></a> '; |
| 563 | - } else {
|
|
| 566 | + } else { |
|
| 564 | 567 | $publish_btn = '<a title="[%unpublish_resource%]" href="index.php?a=62&id=[+id+]" target="main"><i class="fa fa-arrow-down fa-fw"></i></a> '; |
| 565 | 568 | } |
| 566 | 569 | $ph['publish_btn'] = str_replace('[+id+]', $docid, $publish_btn);
|
| 567 | 570 | |
| 568 | 571 | $ph['info_btn'] = str_replace('[+id+]', $docid, '<a title="[%resource_overview%]" data-toggle="collapse" data-target=".collapse[+id+]"><i class="fa fa-info fa-fw"></i></a>');
|
| 569 | 572 | |
| 570 | - if ($ph['longtitle'] == '') {
|
|
| 573 | + if ($ph['longtitle'] == '') { |
|
| 571 | 574 | $ph['longtitle'] = '(<i>[%not_set%]</i>)'; |
| 572 | 575 | } |
| 573 | - if ($ph['description'] == '') {
|
|
| 576 | + if ($ph['description'] == '') { |
|
| 574 | 577 | $ph['description'] = '(<i>[%not_set%]</i>)'; |
| 575 | 578 | } |
| 576 | - if ($ph['introtext'] == '') {
|
|
| 579 | + if ($ph['introtext'] == '') { |
|
| 577 | 580 | $ph['introtext'] = '(<i>[%not_set%]</i>)'; |
| 578 | 581 | } |
| 579 | - if ($ph['alias'] == '') {
|
|
| 582 | + if ($ph['alias'] == '') { |
|
| 580 | 583 | $ph['alias'] = '(<i>[%not_set%]</i>)'; |
| 581 | 584 | } |
| 582 | 585 | |
@@ -585,8 +588,8 @@ discard block |
||
| 585 | 588 | return implode("\n", $output);
|
| 586 | 589 | } |
| 587 | 590 | |
| 588 | -function getRecentInfoRowTpl() |
|
| 589 | -{
|
|
| 591 | +function getRecentInfoRowTpl() |
|
| 592 | +{ |
|
| 590 | 593 | $tpl = ' |
| 591 | 594 | <tr> |
| 592 | 595 | <td data-toggle="collapse" data-target=".collapse[+id+]" class="text-right"><span class="label label-info">[+id+]</span></td> |
@@ -615,13 +618,13 @@ discard block |
||
| 615 | 618 | } |
| 616 | 619 | |
| 617 | 620 | // setup icons |
| 618 | -function wrapIcon($i, $action) |
|
| 619 | -{
|
|
| 621 | +function wrapIcon($i, $action) |
|
| 622 | +{ |
|
| 620 | 623 | return sprintf('<a href="index.php?a=%s" target="main"><span class="wm_button" style="border:0">%s</span></a>', $action, $i);
|
| 621 | 624 | } |
| 622 | 625 | |
| 623 | -function getStartUpScript() |
|
| 624 | -{
|
|
| 626 | +function getStartUpScript() |
|
| 627 | +{ |
|
| 625 | 628 | $script = ' |
| 626 | 629 | <script type="text/javascript"> |
| 627 | 630 | function hideConfigCheckWarning(key) {
|