Completed
Push — develop ( c2f05b...0d7820 )
by Serg
12:40
created
manager/frames/1.php 1 patch
Braces   +30 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,9 +424,12 @@  discard block
 block discarded – undo
424 424
             <div id="evo-tab-page-home" class="evo-tab-page show">
425 425
                 <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe>
426 426
             </div>
427
-        <?php else: ?>
427
+        <?php else {
428
+    : ?>
428 429
             <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe>
429
-        <?php endif; ?>
430
+        <?php endif;
431
+}
432
+?>
430 433
         <div id="mainloader"></div>
431 434
     </div>
432 435
     <div id="resizer"></div>
@@ -439,11 +442,11 @@  discard block
 block discarded – undo
439 442
             'tree_sortdir',
440 443
             'tree_nodename'
441 444
         );
442
-        foreach ($sortParams as $param) {
443
-            if (isset($_REQUEST[$param])) {
445
+        foreach ($sortParams as $param) {
446
+            if (isset($_REQUEST[$param])) {
444 447
                 $modx->manager->saveLastUserSetting($param, $_REQUEST[$param]);
445 448
                 $_SESSION[$param] = $_REQUEST[$param];
446
-            } else if (!isset($_SESSION[$param])) {
449
+            } else if (!isset($_SESSION[$param])) {
447 450
                 $_SESSION[$param] = $modx->manager->getLastUserSetting($param);
448 451
             }
449 452
         }
@@ -529,9 +532,9 @@  discard block
 block discarded – undo
529 532
      * @param string $text
530 533
      * @param bool $allowed
531 534
      */
532
-    function constructLink($action, $img, $text, $allowed)
533
-    {
534
-        if ((bool)$allowed) {
535
+    function constructLink($action, $img, $text, $allowed)
536
+    {
537
+        if ((bool)$allowed) {
535 538
             echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, $action);
536 539
             echo sprintf('<i class="%s"></i> %s</div>', $img, $text);
537 540
         }
@@ -636,7 +639,7 @@  discard block
 block discarded – undo
636 639
     ?>
637 640
 
638 641
 </div>
639
-<?php if ($modx->config['show_picker'] != "0") {
642
+<?php if ($modx->config['show_picker'] != "0") {
640 643
     include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php');
641 644
 } ?>
642 645
 </body>
Please login to merge, or discard this patch.
manager/includes/header.inc.php 1 patch
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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 />
4 4
     Please use the EVO Content Manager instead of accessing this file directly.");
5 5
 }
@@ -10,25 +10,25 @@  discard block
 block discarded – undo
10 10
 $modx_textdir = isset($modx_textdir) ? $modx_textdir : null;
11 11
 $onManagerMainFrameHeaderHTMLBlock = is_array($evtOut) ? implode("\n", $evtOut) : '';
12 12
 $textdir = $modx_textdir === 'rtl' ? 'rtl' : 'ltr';
13
-if (!isset($modx->config['mgr_jquery_path'])) {
13
+if (!isset($modx->config['mgr_jquery_path'])) {
14 14
     $modx->config['mgr_jquery_path'] = 'media/script/jquery/jquery.min.js';
15 15
 }
16
-if (!isset($modx->config['mgr_date_picker_path'])) {
16
+if (!isset($modx->config['mgr_date_picker_path'])) {
17 17
     $modx->config['mgr_date_picker_path'] = 'media/script/air-datepicker/datepicker.inc.php';
18 18
 }
19 19
 
20 20
 $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
21
-if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
21
+if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
22 22
     $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']];
23
-} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
23
+} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
24 24
     $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']];
25 25
 }
26 26
 
27 27
 $css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
28 28
 
29
-if ($modx->config['manager_theme'] == 'default') {
29
+if ($modx->config['manager_theme'] == 'default') {
30 30
     if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')
31
-        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
31
+        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
32 32
         require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
33 33
         $minifier = new Formatter\CSSMinify();
34 34
         $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css');
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             $css
49 49
         );
50 50
     }
51
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
51
+    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
52 52
         $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
53 53
     }
54 54
 }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     <script src="media/script/main.js"></script>
106 106
     <script>
107 107
         <?php
108
-        if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
108
+        if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
109 109
             echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
110 110
         }
111 111
         ?>
Please login to merge, or discard this patch.