Completed
Push — develop ( b42174...27c634 )
by Serg
05:10
created
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 />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 $mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en';
@@ -9,23 +9,23 @@  discard block
 block discarded – undo
9 9
 $modx_textdir = isset($modx_textdir) ? $modx_textdir : null;
10 10
 $onManagerMainFrameHeaderHTMLBlock = is_array($evtOut) ? implode("\n", $evtOut) : '';
11 11
 $textdir = $modx_textdir === 'rtl' ? 'rtl' : 'ltr';
12
-if (!isset($modx->config['mgr_jquery_path'])) {
12
+if (!isset($modx->config['mgr_jquery_path'])) {
13 13
     $modx->config['mgr_jquery_path'] = 'media/script/jquery/jquery.min.js';
14 14
 }
15
-if (!isset($modx->config['mgr_date_picker_path'])) {
15
+if (!isset($modx->config['mgr_date_picker_path'])) {
16 16
     $modx->config['mgr_date_picker_path'] = 'media/script/air-datepicker/datepicker.inc.php';
17 17
 }
18 18
 
19
-if (isset($_COOKIE['MODX_themeColor'])) {
19
+if (isset($_COOKIE['MODX_themeColor'])) {
20 20
     $body_class .= ' ' . $_COOKIE['MODX_themeColor'];
21
-} else {
21
+} else {
22 22
     $body_class .= ' dark';
23 23
 }
24 24
 
25 25
 $css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
26 26
 
27
-if ($modx->config['manager_theme'] == 'default') {
28
-    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')) {
27
+if ($modx->config['manager_theme'] == 'default') {
28
+    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')) {
29 29
         require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
30 30
         $minifier = new Formatter\CSSMinify();
31 31
         $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $css = $minifier->minify();
43 43
         file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css);
44 44
     }
45
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
45
+    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
46 46
         $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
47 47
     }
48 48
 }
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         stopWorker();
366 366
 
367 367
           <?php
368
-          if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
368
+          if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
369 369
               echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
370 370
           }
371 371
           ?>
Please login to merge, or discard this patch.
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,23 +35,23 @@  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
-if (isset($_COOKIE['MODX_themeColor'])) {
48
+if (isset($_COOKIE['MODX_themeColor'])) {
49 49
     $body_class .= ' ' . $_COOKIE['MODX_themeColor'];
50
-} else {
50
+} else {
51 51
     $body_class .= ' dark';
52 52
 }
53 53
 
54
-if (isset($modx->pluginCache['ElementsInTree'])) {
54
+if (isset($modx->pluginCache['ElementsInTree'])) {
55 55
     $body_class .= ' ElementsInTree';
56 56
 }
57 57
 
@@ -67,19 +67,19 @@  discard block
 block discarded – undo
67 67
     'type8' => $_lang["lock_element_type_8"]
68 68
 );
69 69
 
70
-foreach ($unlockTranslations as $key => $value) {
70
+foreach ($unlockTranslations as $key => $value) {
71 71
     $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
72 72
 }
73 73
 
74 74
 $user = $modx->getUserInfo($modx->getLoginUserID());
75
-if ($user['which_browser'] == 'default') {
75
+if ($user['which_browser'] == 'default') {
76 76
     $user['which_browser'] = $modx->config['which_browser'];
77 77
 }
78 78
 
79 79
 $css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime;
80 80
 
81
-if ($modx->config['manager_theme'] == 'default') {
82
-    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')) {
81
+if ($modx->config['manager_theme'] == 'default') {
82
+    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 83
         require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
84 84
         $minifier = new Formatter\CSSMinify();
85 85
         $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css');
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $css = $minifier->minify();
97 97
         file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css);
98 98
     }
99
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
99
+    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
100 100
         $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
101 101
     }
102 102
 }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     <?php
251 251
     // invoke OnManagerTopPrerender event
252 252
     $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST);
253
-    if (is_array($evtOut)) {
253
+    if (is_array($evtOut)) {
254 254
         echo implode("\n", $evtOut);
255 255
     }
256 256
     ?>
@@ -421,9 +421,12 @@  discard block
 block discarded – undo
421 421
             <div id="evo-tab-page-home" class="evo-tab-page show">
422 422
                 <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe>
423 423
             </div>
424
-        <?php else: ?>
424
+        <?php else {
425
+    : ?>
425 426
             <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe>
426
-        <?php endif; ?>
427
+        <?php endif;
428
+}
429
+?>
427 430
         <div id="mainloader"></div>
428 431
     </div>
429 432
     <div id="resizer"></div>
@@ -436,11 +439,11 @@  discard block
 block discarded – undo
436 439
             'tree_sortdir',
437 440
             'tree_nodename'
438 441
         );
439
-        foreach ($sortParams as $param) {
440
-            if (isset($_REQUEST[$param])) {
442
+        foreach ($sortParams as $param) {
443
+            if (isset($_REQUEST[$param])) {
441 444
                 $modx->manager->saveLastUserSetting($param, $_REQUEST[$param]);
442 445
                 $_SESSION[$param] = $_REQUEST[$param];
443
-            } else if (!isset($_SESSION[$param])) {
446
+            } else if (!isset($_SESSION[$param])) {
444 447
                 $_SESSION[$param] = $modx->manager->getLastUserSetting($param);
445 448
             }
446 449
         }
@@ -526,9 +529,9 @@  discard block
 block discarded – undo
526 529
      * @param string $text
527 530
      * @param bool $allowed
528 531
      */
529
-    function constructLink($action, $img, $text, $allowed)
530
-    {
531
-        if ((bool)$allowed) {
532
+    function constructLink($action, $img, $text, $allowed)
533
+    {
534
+        if ((bool)$allowed) {
532 535
             echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, $action);
533 536
             echo sprintf('<i class="%s"></i> %s</div>', $img, $text);
534 537
         }
@@ -633,7 +636,7 @@  discard block
 block discarded – undo
633 636
     ?>
634 637
 
635 638
 </div>
636
-<?php if ($modx->config['show_picker'] != "0") {
639
+<?php if ($modx->config['show_picker'] != "0") {
637 640
     include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php');
638 641
 } ?>
639 642
 </body>
Please login to merge, or discard this patch.