@@ -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 | header("X-XSS-Protection: 0");
|
@@ -11,22 +11,22 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | $mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en'; |
| 13 | 13 | |
| 14 | -if (!isset($modx->config['manager_menu_height'])) {
|
|
| 14 | +if (!isset($modx->config['manager_menu_height'])) { |
|
| 15 | 15 | $modx->config['manager_menu_height'] = 2.2; // rem |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -if (!isset($modx->config['manager_tree_width'])) {
|
|
| 18 | +if (!isset($modx->config['manager_tree_width'])) { |
|
| 19 | 19 | $modx->config['manager_tree_width'] = 20; // rem |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) {
|
|
| 22 | +if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) { |
|
| 23 | 23 | $initMainframeAction = $_SESSION['onLoginForwardToAction']; |
| 24 | 24 | unset($_SESSION['onLoginForwardToAction']); |
| 25 | -} else {
|
|
| 25 | +} else { |
|
| 26 | 26 | $initMainframeAction = 2; // welcome.static |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | -if (!isset($_SESSION['tree_show_only_folders'])) {
|
|
| 29 | +if (!isset($_SESSION['tree_show_only_folders'])) { |
|
| 30 | 30 | $_SESSION['tree_show_only_folders'] = 0; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -35,25 +35,25 @@ discard block |
||
| 35 | 35 | $tree_width = $modx->config['manager_tree_width']; |
| 36 | 36 | $tree_min_width = 0; |
| 37 | 37 | |
| 38 | -if (isset($_COOKIE['MODX_widthSideBar'])) {
|
|
| 38 | +if (isset($_COOKIE['MODX_widthSideBar'])) { |
|
| 39 | 39 | $MODX_widthSideBar = $_COOKIE['MODX_widthSideBar']; |
| 40 | -} else {
|
|
| 40 | +} else { |
|
| 41 | 41 | $MODX_widthSideBar = $tree_width; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | -if (!$MODX_widthSideBar) {
|
|
| 44 | +if (!$MODX_widthSideBar) { |
|
| 45 | 45 | $body_class .= 'sidebar-closed'; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
|
| 49 | -if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
|
|
| 49 | +if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
|
| 50 | 50 | $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
| 51 | -} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
|
|
| 51 | +} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
|
| 52 | 52 | $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | |
| 56 | -if (isset($modx->pluginCache['ElementsInTree'])) {
|
|
| 56 | +if (isset($modx->pluginCache['ElementsInTree'])) { |
|
| 57 | 57 | $body_class .= ' ElementsInTree'; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -69,19 +69,19 @@ discard block |
||
| 69 | 69 | 'type8' => $_lang["lock_element_type_8"] |
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | -foreach ($unlockTranslations as $key => $value) {
|
|
| 72 | +foreach ($unlockTranslations as $key => $value) { |
|
| 73 | 73 | $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $user = $modx->getUserInfo($modx->getLoginUserID()); |
| 77 | -if ($user['which_browser'] == 'default') {
|
|
| 77 | +if ($user['which_browser'] == 'default') { |
|
| 78 | 78 | $user['which_browser'] = $modx->config['which_browser']; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
| 82 | 82 | |
| 83 | -if ($modx->config['manager_theme'] == 'default') {
|
|
| 84 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
|
|
| 83 | +if ($modx->config['manager_theme'] == 'default') { |
|
| 84 | + if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
| 85 | 85 | require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
| 86 | 86 | $minifier = new Formatter\CSSMinify(); |
| 87 | 87 | $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $css = $minifier->minify(); |
| 99 | 99 | file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
| 100 | 100 | } |
| 101 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
|
|
| 101 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
| 102 | 102 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
| 103 | 103 | } |
| 104 | 104 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | <?php |
| 254 | 254 | // invoke OnManagerTopPrerender event |
| 255 | 255 | $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST);
|
| 256 | - if (is_array($evtOut)) {
|
|
| 256 | + if (is_array($evtOut)) { |
|
| 257 | 257 | echo implode("\n", $evtOut);
|
| 258 | 258 | } |
| 259 | 259 | ?> |
@@ -424,11 +424,14 @@ discard block |
||
| 424 | 424 | <div id="evo-tab-page-home" class="evo-tab-page show iframe-scroller"> |
| 425 | 425 | <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="no" frameborder="0" onload="modx.main.onload(event);"></iframe> |
| 426 | 426 | </div> |
| 427 | - <?php else: ?> |
|
| 427 | + <?php else { |
|
| 428 | + : ?> |
|
| 428 | 429 | <div class="iframe-scroller"> |
| 429 | 430 | <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="no" frameborder="0" onload="modx.main.onload(event);"></iframe> |
| 430 | 431 | </div> |
| 431 | - <?php endif; ?> |
|
| 432 | + <?php endif; |
|
| 433 | +} |
|
| 434 | +?> |
|
| 432 | 435 | <div id="mainloader"></div> |
| 433 | 436 | </div> |
| 434 | 437 | <div id="resizer"></div> |
@@ -441,11 +444,11 @@ discard block |
||
| 441 | 444 | 'tree_sortdir', |
| 442 | 445 | 'tree_nodename' |
| 443 | 446 | ); |
| 444 | - foreach ($sortParams as $param) {
|
|
| 445 | - if (isset($_REQUEST[$param])) {
|
|
| 447 | + foreach ($sortParams as $param) { |
|
| 448 | + if (isset($_REQUEST[$param])) { |
|
| 446 | 449 | $modx->manager->saveLastUserSetting($param, $_REQUEST[$param]); |
| 447 | 450 | $_SESSION[$param] = $_REQUEST[$param]; |
| 448 | - } else if (!isset($_SESSION[$param])) {
|
|
| 451 | + } else if (!isset($_SESSION[$param])) { |
|
| 449 | 452 | $_SESSION[$param] = $modx->manager->getLastUserSetting($param); |
| 450 | 453 | } |
| 451 | 454 | } |
@@ -531,9 +534,9 @@ discard block |
||
| 531 | 534 | * @param string $text |
| 532 | 535 | * @param bool $allowed |
| 533 | 536 | */ |
| 534 | - function constructLink($action, $img, $text, $allowed) |
|
| 535 | - {
|
|
| 536 | - if ((bool)$allowed) {
|
|
| 537 | + function constructLink($action, $img, $text, $allowed) |
|
| 538 | + { |
|
| 539 | + if ((bool)$allowed) { |
|
| 537 | 540 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, $action);
|
| 538 | 541 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text);
|
| 539 | 542 | } |
@@ -638,7 +641,7 @@ discard block |
||
| 638 | 641 | ?> |
| 639 | 642 | |
| 640 | 643 | </div> |
| 641 | -<?php if ($modx->config['show_picker'] != "0") {
|
|
| 644 | +<?php if ($modx->config['show_picker'] != "0") { |
|
| 642 | 645 | include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php');
|
| 643 | 646 | } ?> |
| 644 | 647 | </body> |