@@ -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,29 +35,29 @@ 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 | $navbar_position = $modx->config['manager_menu_position']; |
56 | -if ($navbar_position == 'left') { |
|
56 | +if ($navbar_position == 'left') { |
|
57 | 57 | $body_class .= ' navbar-left navbar-left-icon-and-text'; |
58 | 58 | } |
59 | 59 | |
60 | -if (isset($modx->pluginCache['ElementsInTree'])) { |
|
60 | +if (isset($modx->pluginCache['ElementsInTree'])) { |
|
61 | 61 | $body_class .= ' ElementsInTree'; |
62 | 62 | } |
63 | 63 | |
@@ -73,19 +73,19 @@ discard block |
||
73 | 73 | 'type8' => $_lang["lock_element_type_8"] |
74 | 74 | ); |
75 | 75 | |
76 | -foreach ($unlockTranslations as $key => $value) { |
|
76 | +foreach ($unlockTranslations as $key => $value) { |
|
77 | 77 | $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
78 | 78 | } |
79 | 79 | |
80 | 80 | $user = $modx->getUserInfo($modx->getLoginUserID()); |
81 | -if ($user['which_browser'] == 'default') { |
|
81 | +if ($user['which_browser'] == 'default') { |
|
82 | 82 | $user['which_browser'] = $modx->config['which_browser']; |
83 | 83 | } |
84 | 84 | |
85 | 85 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
86 | 86 | |
87 | -if ($modx->config['manager_theme'] == 'default') { |
|
88 | - 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')) { |
|
87 | +if ($modx->config['manager_theme'] == 'default') { |
|
88 | + 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')) { |
|
89 | 89 | require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
90 | 90 | $minifier = new Formatter\CSSMinify(); |
91 | 91 | $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $css = $minifier->minify(); |
103 | 103 | file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
104 | 104 | } |
105 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
105 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
106 | 106 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
107 | 107 | } |
108 | 108 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | <?php |
258 | 258 | // invoke OnManagerTopPrerender event |
259 | 259 | $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST); |
260 | - if (is_array($evtOut)) { |
|
260 | + if (is_array($evtOut)) { |
|
261 | 261 | echo implode("\n", $evtOut); |
262 | 262 | } |
263 | 263 | ?> |
@@ -428,11 +428,14 @@ discard block |
||
428 | 428 | <div id="evo-tab-page-home" class="evo-tab-page show iframe-scroller"> |
429 | 429 | <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
430 | 430 | </div> |
431 | - <?php else: ?> |
|
431 | + <?php else { |
|
432 | + : ?> |
|
432 | 433 | <div class="iframe-scroller"> |
433 | 434 | <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
434 | 435 | </div> |
435 | - <?php endif; ?> |
|
436 | + <?php endif; |
|
437 | +} |
|
438 | +?> |
|
436 | 439 | <script> |
437 | 440 | if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) { |
438 | 441 | document.getElementById('mainframe').setAttribute('scrolling', 'no'); |
@@ -451,11 +454,11 @@ discard block |
||
451 | 454 | 'tree_sortdir', |
452 | 455 | 'tree_nodename' |
453 | 456 | ); |
454 | - foreach ($sortParams as $param) { |
|
455 | - if (isset($_REQUEST[$param])) { |
|
457 | + foreach ($sortParams as $param) { |
|
458 | + if (isset($_REQUEST[$param])) { |
|
456 | 459 | $modx->manager->saveLastUserSetting($param, $_REQUEST[$param]); |
457 | 460 | $_SESSION[$param] = $_REQUEST[$param]; |
458 | - } else if (!isset($_SESSION[$param])) { |
|
461 | + } else if (!isset($_SESSION[$param])) { |
|
459 | 462 | $_SESSION[$param] = $modx->manager->getLastUserSetting($param); |
460 | 463 | } |
461 | 464 | } |
@@ -541,9 +544,9 @@ discard block |
||
541 | 544 | * @param string $text |
542 | 545 | * @param bool $allowed |
543 | 546 | */ |
544 | - function constructLink($action, $img, $text, $allowed) |
|
545 | - { |
|
546 | - if ((bool)$allowed) { |
|
547 | + function constructLink($action, $img, $text, $allowed) |
|
548 | + { |
|
549 | + if ((bool)$allowed) { |
|
547 | 550 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, $action); |
548 | 551 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text); |
549 | 552 | } |
@@ -648,7 +651,7 @@ discard block |
||
648 | 651 | ?> |
649 | 652 | |
650 | 653 | </div> |
651 | -<?php if ($modx->config['show_picker'] != "0") { |
|
654 | +<?php if ($modx->config['show_picker'] != "0") { |
|
652 | 655 | include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php'); |
653 | 656 | } ?> |
654 | 657 | </body> |