Completed
Push — develop ( b2c942...8bfc17 )
by Serg
05:46
created
manager/includes/template.parser.class.inc.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
  * @todo could be unnecessary
9 9
  *
10 10
  */
11
-Class TemplateParser extends EvolutionCMS\Legacy\TemplateParser
12
-{
11
+Class TemplateParser extends EvolutionCMS\Legacy\TemplateParser
12
+{
13 13
 }
14 14
 
15 15
 ?>
Please login to merge, or discard this patch.
manager/includes/functions/tv.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -573,7 +573,8 @@
 block discarded – undo
573 573
      * @return array|string
574 574
      */
575 575
     function parseInput($src, $delim = "||", $type = "string", $columns = true)
576
-    { // type can be: string, array
576
+    {
577
+// type can be: string, array
577 578
         $modx = evolutionCMS();
578 579
         if ($modx->db->isResult($src)) {
579 580
             // must be a recordset
Please login to merge, or discard this patch.
manager/includes/bootstrap.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * @see https://github.com/theseer/Autoload
4 4
  */
5 5
 spl_autoload_register(
6
-    function ($class) {
6
+    function ($class){
7 7
         static $classes = null;
8 8
         if ($classes === null) {
9 9
             $classes = array(
Please login to merge, or discard this patch.
manager/frames/1.php 1 patch
Braces   +32 added lines, -29 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,29 +35,29 @@  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
 $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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
@@ -535,16 +538,16 @@  discard block
 block discarded – undo
535 538
     </div>
536 539
 
537 540
     <?php
538
-    if(!function_exists('constructLink')) {
541
+    if(!function_exists('constructLink')) {
539 542
         /**
540 543
          * @param string $action
541 544
          * @param string $img
542 545
          * @param string $text
543 546
          * @param bool $allowed
544 547
          */
545
-        function constructLink($action, $img, $text, $allowed)
546
-        {
547
-            if ((bool)$allowed) {
548
+        function constructLink($action, $img, $text, $allowed)
549
+        {
550
+            if ((bool)$allowed) {
548 551
                 echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action,
549 552
                     $action);
550 553
                 echo sprintf('<i class="%s"></i> %s</div>', $img, $text);
@@ -651,7 +654,7 @@  discard block
 block discarded – undo
651 654
     ?>
652 655
 
653 656
 </div>
654
-<?php if ($modx->config['show_picker'] != "0") {
657
+<?php if ($modx->config['show_picker'] != "0") {
655 658
     include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php');
656 659
 } ?>
657 660
 </body>
Please login to merge, or discard this patch.
manager/actions/mutate_content.dynamic.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -476,7 +476,8 @@  discard block
 block discarded – undo
476 476
 			return s;
477 477
 		}
478 478
 
479
-		<?php if ($content['type'] == 'reference' || $modx->manager->action == '72') { // Web Link specific ?>
479
+		<?php if ($content['type'] == 'reference' || $modx->manager->action == '72') {
480
+// Web Link specific ?>
480 481
 		var lastImageCtrl;
481 482
 		var lastFileCtrl;
482 483
 
@@ -692,7 +693,8 @@  discard block
 block discarded – undo
692 693
 									</td>
693 694
 								</tr>
694 695
 
695
-								<?php if($content['type'] == 'reference' || $modx->manager->action == '72') { // Web Link specific ?>
696
+								<?php if($content['type'] == 'reference' || $modx->manager->action == '72') {
697
+// Web Link specific ?>
696 698
 
697 699
 									<tr>
698 700
 										<td><span class="warning"><?= $_lang['weblink'] ?></span>
@@ -1370,7 +1372,9 @@  discard block
 block discarded – undo
1370 1372
 						if($documentId > 0) {
1371 1373
 							// Load up, the permissions from the parent (if new document) or existing document
1372 1374
 							$rs = $modx->db->select('id, document_group', $tbl_document_groups, "document='{$documentId}'");
1373
-							while($currentgroup = $modx->db->getRow($rs)) $groupsarray[] = $currentgroup['document_group'] . ',' . $currentgroup['id'];
1375
+							while($currentgroup = $modx->db->getRow($rs)) {
1376
+							    $groupsarray[] = $currentgroup['document_group'] . ',' . $currentgroup['id'];
1377
+							}
1374 1378
 
1375 1379
 							// Load up the current permissions and names
1376 1380
 							$vs = array(
@@ -1432,7 +1436,9 @@  discard block
 block discarded – undo
1432 1436
 
1433 1437
 							// Create attribute string list
1434 1438
 							$inputString = array();
1435
-							foreach($inputAttributes as $k => $v) $inputString[] = $k . '="' . $v . '"';
1439
+							foreach($inputAttributes as $k => $v) {
1440
+							    $inputString[] = $k . '="' . $v . '"';
1441
+							}
1436 1442
 
1437 1443
 							// Make the <input> HTML
1438 1444
 							$inputHTML = '<input ' . implode(' ', $inputString) . ' />';
Please login to merge, or discard this patch.
manager/actions/mutate_categories.dynamic.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,16 +27,14 @@
 block discarded – undo
27 27
 $cm = new EvolutionCMS\Legacy\ModuleCategoriesManager();
28 28
 
29 29
 // assign module_params to internal params
30
-foreach( $_module_params as $param => $value )
31
-{
30
+foreach( $_module_params as $param => $value ) {
32 31
 	$cm->set( $param, $value );
33 32
 }
34 33
 
35 34
 // catch the request actions
36 35
 include_once $cm->get('inc_dir') . 'request_trigger.inc.php';
37 36
 
38
-if( !$categories = $cm->getCategories() )
39
-{
37
+if( !$categories = $cm->getCategories() ) {
40 38
 	setcookie('webfxtab_manage-categories-pane', 0 );
41 39
 	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
42 40
 }
Please login to merge, or discard this patch.
manager/actions/category_mgr/inc/Categories.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,4 +4,6 @@
 block discarded – undo
4 4
  * Class to handle the modx-categories
5 5
  * @deprecated use EvolutionCMS\Legacy\Categories
6 6
  */
7
-class Categories extends EvolutionCMS\Legacy\Categories{}
7
+class Categories extends EvolutionCMS\Legacy\Categories
8
+{
9
+}
Please login to merge, or discard this patch.
manager/processors/execute_module.processor.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 }
13 13
 
14 14
 // check if user has access permission, except admins
15
-if($_SESSION['mgrRole']!=1){
15
+if($_SESSION['mgrRole']!=1) {
16 16
 	$rs = $modx->db->select(
17 17
 		'sma.usergroup,mg.member',
18 18
 		$modx->getFullTableName("site_module_access")." sma
Please login to merge, or discard this patch.
manager/processors/duplicate_module.processor.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,11 @@
 block discarded – undo
31 31
 // count duplicates
32 32
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_modules'), "id='{$id}'"));
33 33
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_modules'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
34
-if($count>=1) $count = ' '.($count+1);
35
-else $count = '';
34
+if($count>=1) {
35
+    $count = ' '.($count+1);
36
+} else {
37
+    $count = '';
38
+}
36 39
 
37 40
 // duplicate module
38 41
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.