Completed
Pull Request — develop (#725)
by Agel_Nash
14:22
created
manager/includes/rss.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 ---------------------------------------------- */
28 28
 
29 29
 // include MagPieRSS
30
-require_once(MODX_MANAGER_PATH . 'media/rss/rss_fetch.inc');
30
+require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc');
31 31
 /**
32 32
  * Convert relative path into absolute url
33 33
  *
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     $tmp = parse_url($base);
42 42
     extract($tmp);
43 43
     if (strpos($rel, "//") === 0) {
44
-        return $scheme . ':' . $rel;
44
+        return $scheme.':'.$rel;
45 45
     }
46 46
     // return if already absolute URL
47 47
     if (parse_url($rel, PHP_URL_SCHEME) != '') {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     }
50 50
     // queries and anchors
51 51
     if ($rel[0] == '#' || $rel[0] == '?') {
52
-        return $base . $rel;
52
+        return $base.$rel;
53 53
     }
54 54
     // remove non-directory element from path
55 55
     $path = preg_replace('#/[^/]*$#', '', $path);
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
         $path = '';
59 59
     }
60 60
     // dirty absolute URL
61
-    $abs = $host . $path . "/" . $rel;
61
+    $abs = $host.$path."/".$rel;
62 62
     // replace '//' or  '/./' or '/foo/../' with '/'
63 63
     $abs = preg_replace("/(\/\.?\/)/", "/", $abs);
64 64
     $abs = preg_replace("/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs);
65 65
 
66 66
     // absolute URL is ready!
67
-    return $scheme . '://' . $abs;
67
+    return $scheme.'://'.$abs;
68 68
 }
69 69
 
70 70
 $feedData = array();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     $output = '';
75 75
     $rss = @fetch_rss($url);
76 76
     if (!$rss) {
77
-        $feedData[$section] = 'Failed to retrieve ' . $url;
77
+        $feedData[$section] = 'Failed to retrieve '.$url;
78 78
         continue;
79 79
     }
80 80
     $output .= '<ul>';
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
         $description = strip_tags($item['description']);
89 89
         if (strlen($description) > 199) {
90 90
             $description = substr($description, 0, 200);
91
-            $description .= '...<br />Read <a href="' . $href . '" target="_blank">more</a>.';
91
+            $description .= '...<br />Read <a href="'.$href.'" target="_blank">more</a>.';
92 92
         }
93
-        $output .= '<li><a href="' . $href . '" target="_blank">' . $title . '</a> - <b>' . $pubdate . '</b><br />' . $description . '</li>';
93
+        $output .= '<li><a href="'.$href.'" target="_blank">'.$title.'</a> - <b>'.$pubdate.'</b><br />'.$description.'</li>';
94 94
     }
95 95
 
96 96
     $output .= '</ul>';
Please login to merge, or discard this patch.
manager/media/script/air-datepicker/datepicker.inc.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10 10
         if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
11
-		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
11
+        $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 12
         return $modx->mergeSettingsContent($load_script);
13 13
     }
14 14
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
2
+class DATEPICKER{
3 3
     /**
4 4
      * @return string
5 5
      */
6
-    public function getDP() {
6
+    public function getDP(){
7 7
         $modx = evolutionCMS();
8 8
 
9 9
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10
-        if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
10
+        if (!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
11 11
 		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 12
         return $modx->mergeSettingsContent($load_script);
13 13
     }
@@ -15,14 +15,14 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @return string
17 17
      */
18
-    public function getLangCode() {
18
+    public function getLangCode(){
19 19
         $modx = evolutionCMS(); global $modx_lang_attribute;
20 20
 
21
-        if(!$modx_lang_attribute) return 'en';
21
+        if (!$modx_lang_attribute) return 'en';
22 22
 
23 23
         $lc = $modx_lang_attribute;
24
-        if($lc === 'uk') return 'ru';
25
-        $dp_path = str_replace('\\','/',dirname(__FILE__));
24
+        if ($lc === 'uk') return 'ru';
25
+        $dp_path = str_replace('\\', '/', dirname(__FILE__));
26 26
 
27 27
         return (is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) ? $modx_lang_attribute : 'en';
28 28
     }
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,13 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
2
+class DATEPICKER
3
+{
3 4
     /**
4 5
      * @return string
5 6
      */
6
-    public function getDP() {
7
+    public function getDP()
8
+    {
7 9
         $modx = evolutionCMS();
8 10
 
9 11
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10
-        if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
12
+        if(!isset($modx->config['lang_code'])) {
13
+            $modx->config['lang_code'] = $this->getLangCode();
14
+        }
11 15
 		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 16
         return $modx->mergeSettingsContent($load_script);
13 17
     }
@@ -15,13 +19,18 @@  discard block
 block discarded – undo
15 19
     /**
16 20
      * @return string
17 21
      */
18
-    public function getLangCode() {
22
+    public function getLangCode()
23
+    {
19 24
         $modx = evolutionCMS(); global $modx_lang_attribute;
20 25
 
21
-        if(!$modx_lang_attribute) return 'en';
26
+        if(!$modx_lang_attribute) {
27
+            return 'en';
28
+        }
22 29
 
23 30
         $lc = $modx_lang_attribute;
24
-        if($lc === 'uk') return 'ru';
31
+        if($lc === 'uk') {
32
+            return 'ru';
33
+        }
25 34
         $dp_path = str_replace('\\','/',dirname(__FILE__));
26 35
 
27 36
         return (is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) ? $modx_lang_attribute : 'en';
Please login to merge, or discard this patch.
manager/frames/nodes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
     exit('send some data');
19 19
 } //??
20 20
 
21
-$indent = (int)$_REQUEST['indent'];
22
-$parent = (int)$_REQUEST['parent'];
23
-$expandAll = (int)$_REQUEST['expandAll'];
21
+$indent = (int) $_REQUEST['indent'];
22
+$parent = (int) $_REQUEST['parent'];
23
+$expandAll = (int) $_REQUEST['expandAll'];
24 24
 $output = '';
25 25
 $hereid = isset($_REQUEST['id']) && is_numeric($_REQUEST['id']) ? $_REQUEST['id'] : '';
26 26
 
Please login to merge, or discard this patch.
manager/media/calendar/datepicker.inc.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class DATEPICKER {
4
-	function __construct() {
5
-	}
4
+    function __construct() {
5
+    }
6 6
 
7
-	function getDP() {
8
-		$modx = evolutionCMS(); global $_lang;
7
+    function getDP() {
8
+        $modx = evolutionCMS(); global $_lang;
9 9
 
10
-		$tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
11
-		return $modx->parseText($tpl, $_lang, '[%', '%]');
12
-	}
10
+        $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
11
+        return $modx->parseText($tpl, $_lang, '[%', '%]');
12
+    }
13 13
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class DATEPICKER {
4
-	function __construct() {
3
+class DATEPICKER{
4
+	function __construct(){
5 5
 	}
6 6
 
7
-	function getDP() {
7
+	function getDP(){
8 8
 		$modx = evolutionCMS(); global $_lang;
9 9
 
10
-		$tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
10
+		$tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
11 11
 		return $modx->parseText($tpl, $_lang, '[%', '%]');
12 12
 	}
13 13
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class DATEPICKER {
4
-	function __construct() {
3
+class DATEPICKER
4
+{
5
+	function __construct()
6
+	{
5 7
 	}
6 8
 
7
-	function getDP() {
9
+	function getDP()
10
+	{
8 11
 		$modx = evolutionCMS(); global $_lang;
9 12
 
10 13
 		$tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
Please login to merge, or discard this patch.
manager/media/style/common/moo-datepicker/datepicker.inc.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
3
-    function __construct() {
2
+class DATEPICKER{
3
+    function __construct(){
4 4
     }
5
-    function getDP() {
5
+    function getDP(){
6 6
         $modx = evolutionCMS(); global$_lang;
7 7
 
8 8
         $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
9
-        return $modx->parseText($tpl,$_lang,'[%','%]');
9
+        return $modx->parseText($tpl, $_lang, '[%', '%]');
10 10
     }
11 11
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,11 @@
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
3
-    function __construct() {
2
+class DATEPICKER
3
+{
4
+    function __construct()
5
+    {
4 6
     }
5
-    function getDP() {
7
+    function getDP()
8
+    {
6 9
         $modx = evolutionCMS(); global$_lang;
7 10
 
8 11
         $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
Please login to merge, or discard this patch.
manager/processors/save_content.processor.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -492,7 +492,7 @@
 block discarded – undo
492 492
                 }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) {
493 493
                 $publishedon = $pub_date;
494 494
                 $publishedby = $modx->getLoginUserID();
495
-                   }elseif ($was_published && !$published) {
495
+                    }elseif ($was_published && !$published) {
496 496
                 $publishedon = 0;
497 497
                 $publishedby = 0;
498 498
             } else {
Please login to merge, or discard this patch.
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -279,19 +279,19 @@
 block discarded – undo
279 279
             // invoke OnBeforeDocFormSave event
280 280
             switch($modx->config['docid_incrmnt_method'])
281 281
             {
282
-            case '1':
283
-                $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id";
284
-                $where = "T1.id IS NULL";
285
-                $rs = $modx->getDatabase()->select('MIN(T0.id)+1', $from, "T1.id IS NULL");
286
-                $id = $modx->getDatabase()->getValue($rs);
282
+                case '1':
283
+                    $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id";
284
+                    $where = "T1.id IS NULL";
285
+                    $rs = $modx->getDatabase()->select('MIN(T0.id)+1', $from, "T1.id IS NULL");
286
+                    $id = $modx->getDatabase()->getValue($rs);
287
+                    break;
288
+                case '2':
289
+                    $rs = $modx->getDatabase()->select('MAX(id)+1', $tbl_site_content);
290
+                    $id = $modx->getDatabase()->getValue($rs);
287 291
                 break;
288
-            case '2':
289
-                $rs = $modx->getDatabase()->select('MAX(id)+1', $tbl_site_content);
290
-                $id = $modx->getDatabase()->getValue($rs);
291
-            break;
292 292
 
293
-            default:
294
-                $id = '';
293
+                default:
294
+                    $id = '';
295 295
             }
296 296
 
297 297
         $modx->invokeEvent("OnBeforeDocFormSave", array(
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         case 'new' :
278 278
 
279 279
             // invoke OnBeforeDocFormSave event
280
-            switch($modx->config['docid_incrmnt_method'])
280
+            switch ($modx->config['docid_incrmnt_method'])
281 281
             {
282 282
             case '1':
283 283
                 $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id";
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
             if (!$was_published && $published) {
489 489
                 $publishedon = $currentdate;
490 490
                 $publishedby = $modx->getLoginUserID();
491
-                }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) {
491
+                }elseif ((!empty($pub_date) && $pub_date <= $currentdate && $published)) {
492 492
                 $publishedon = $pub_date;
493 493
                 $publishedby = $modx->getLoginUserID();
494 494
                    }elseif ($was_published && !$published) {
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
             }
501 501
 
502 502
             // invoke OnBeforeDocFormSave event
503
-            $modx->invokeEvent("OnBeforeDocFormSave", array (
503
+            $modx->invokeEvent("OnBeforeDocFormSave", array(
504 504
                 "mode" => "upd",
505 505
                 "id" => $id
506 506
             ));
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
                 . "menuindex={$menuindex}, "
526 526
                 . "searchable={$searchable}, "
527 527
                 . "cacheable={$cacheable}, "
528
-                . "editedby=" . $modx->getLoginUserID() . ", "
528
+                . "editedby=".$modx->getLoginUserID().", "
529 529
                 . "editedon={$currentdate}, "
530 530
                 . "publishedon={$publishedon}, "
531 531
                 . "publishedby={$publishedby}, "
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 
540 540
             // update template variables
541 541
             $rs = $modx->getDatabase()->select('id, tmplvarid', $tbl_site_tmplvar_contentvalues, "contentid='{$id}'");
542
-            $tvIds = array ();
542
+            $tvIds = array();
543 543
             while ($row = $modx->getDatabase()->getRow($rs)) {
544 544
                 $tvIds[$row['tmplvarid']] = $row['id'];
545 545
             }
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
                     'groups.id, groups.document_group',
593 593
                     "{$tbl_document_groups} AS groups
594 594
                     LEFT JOIN {$tbl_documentgroup_names} AS dgn ON dgn.id = groups.document_group",
595
-                    "((1=".(int)$isManager." AND dgn.private_memgroup) OR (1=".(int)$isWeb." AND dgn.private_webgroup)) AND groups.document = '{$id}'"
595
+                    "((1=".(int) $isManager." AND dgn.private_memgroup) OR (1=".(int) $isWeb." AND dgn.private_webgroup)) AND groups.document = '{$id}'"
596 596
                     );
597 597
                 $old_groups = array();
598 598
                 while ($row = $modx->getDatabase()->getRow($rs)) $old_groups[$row['document_group']] = $row['id'];
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
                         unset($old_groups[$group]);
605 605
                         continue;
606 606
                     } elseif ($link_id == 'new') {
607
-                        $insertions[] = '('.(int)$group.','.$id.')';
607
+                        $insertions[] = '('.(int) $group.','.$id.')';
608 608
                     }
609 609
                 }
610 610
                 if (!empty($insertions)) {
@@ -636,17 +636,17 @@  discard block
 block discarded – undo
636 636
 
637 637
 
638 638
             // invoke OnDocFormSave event
639
-            $modx->invokeEvent("OnDocFormSave", array (
639
+            $modx->invokeEvent("OnDocFormSave", array(
640 640
                 "mode" => "upd",
641 641
                 "id" => $id
642 642
             ));
643 643
 
644 644
             // secure web documents - flag as private
645
-            include MODX_MANAGER_PATH . "includes/secure_web_documents.inc.php";
645
+            include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
646 646
             secureWebDocument($id);
647 647
 
648 648
             // secure manager documents - flag as private
649
-            include MODX_MANAGER_PATH . "includes/secure_mgr_documents.inc.php";
649
+            include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php";
650 650
             secureMgrDocument($id);
651 651
 
652 652
             // Set the item name for logger
@@ -672,13 +672,13 @@  discard block
 block discarded – undo
672 672
                         // document
673 673
                         $a = ($_POST['stay'] == '2') ? "27&id=$id" : "4&pid=$parent";
674 674
                     }
675
-                    $header = "Location: index.php?a=" . $a . "&r=1&stay=" . $_POST['stay'].$add_path;
675
+                    $header = "Location: index.php?a=".$a."&r=1&stay=".$_POST['stay'].$add_path;
676 676
                 } else {
677 677
                     $header = "Location: index.php?a=3&id=$id&r=1".$add_path;
678 678
                 }
679 679
             }
680 680
             if (headers_sent()) {
681
-                $header = str_replace('Location: ','',$header);
681
+                $header = str_replace('Location: ', '', $header);
682 682
                 echo "<script>document.location.href='$header';</script>\n";
683 683
             } else {
684 684
                 header($header);
Please login to merge, or discard this patch.
Braces   +23 added lines, -19 removed lines patch added patch discarded remove patch
@@ -134,8 +134,7 @@  discard block
 block discarded – undo
134 134
         }
135 135
         //end webber
136 136
     }
137
-}
138
-elseif ($alias) {
137
+} elseif ($alias) {
139 138
     $alias = $modx->stripAlias($alias);
140 139
 }
141 140
 
@@ -149,8 +148,7 @@  discard block
 block discarded – undo
149 148
 
150 149
     if ($pub_date < $currentdate) {
151 150
         $published = 1;
152
-    }
153
-    elseif ($pub_date > $currentdate) {
151
+    } elseif ($pub_date > $currentdate) {
154 152
         $published = 0;
155 153
     }
156 154
 }
@@ -277,8 +275,7 @@  discard block
 block discarded – undo
277 275
         case 'new' :
278 276
 
279 277
             // invoke OnBeforeDocFormSave event
280
-            switch($modx->config['docid_incrmnt_method'])
281
-            {
278
+            switch($modx->config['docid_incrmnt_method']) {
282 279
             case '1':
283 280
                 $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id";
284 281
                 $where = "T1.id IS NULL";
@@ -346,8 +343,9 @@  discard block
 block discarded – undo
346 343
             "alias_visible"    => $aliasvisible
347 344
         );
348 345
 
349
-        if ($id != '')
350
-            $dbInsert["id"] = $id;
346
+        if ($id != '') {
347
+                    $dbInsert["id"] = $id;
348
+        }
351 349
 
352 350
         $key = $modx->getDatabase()->insert($dbInsert, $tbl_site_content);
353 351
 
@@ -423,11 +421,13 @@  discard block
 block discarded – undo
423 421
         // redirect/stay options
424 422
         if ($_POST['stay'] != '') {
425 423
             // weblink
426
-            if ($_POST['mode'] == "72")
427
-                $a = ($_POST['stay'] == '2') ? "27&id=$key" : "72&pid=$parent";
424
+            if ($_POST['mode'] == "72") {
425
+                            $a = ($_POST['stay'] == '2') ? "27&id=$key" : "72&pid=$parent";
426
+            }
428 427
             // document
429
-            if ($_POST['mode'] == "4")
430
-                $a = ($_POST['stay'] == '2') ? "27&id=$key" : "4&pid=$parent";
428
+            if ($_POST['mode'] == "4") {
429
+                            $a = ($_POST['stay'] == '2') ? "27&id=$key" : "4&pid=$parent";
430
+            }
431 431
             $header = "Location: index.php?a=".$a."&r=1&stay=".$_POST['stay'];
432 432
         } else {
433 433
             $header = "Location: index.php?a=3&id=$key&r=1";
@@ -488,10 +488,10 @@  discard block
 block discarded – undo
488 488
             if (!$was_published && $published) {
489 489
                 $publishedon = $currentdate;
490 490
                 $publishedby = $modx->getLoginUserID();
491
-                }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) {
491
+                } elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) {
492 492
                 $publishedon = $pub_date;
493 493
                 $publishedby = $modx->getLoginUserID();
494
-                   }elseif ($was_published && !$published) {
494
+                   } elseif ($was_published && !$published) {
495 495
                 $publishedon = 0;
496 496
                 $publishedby = 0;
497 497
             } else {
@@ -547,7 +547,9 @@  discard block
 block discarded – undo
547 547
             $tvChanges = array();
548 548
             foreach ($tmplvars as $field => $value) {
549 549
                 if (!is_array($value)) {
550
-                    if (isset($tvIds[$value])) $tvDeletions[] = $tvIds[$value];
550
+                    if (isset($tvIds[$value])) {
551
+                        $tvDeletions[] = $tvIds[$value];
552
+                    }
551 553
                 } else {
552 554
                     $tvId = $value[0];
553 555
                     $tvVal = $value[1];
@@ -595,7 +597,9 @@  discard block
 block discarded – undo
595 597
                     "((1=".(int)$isManager." AND dgn.private_memgroup) OR (1=".(int)$isWeb." AND dgn.private_webgroup)) AND groups.document = '{$id}'"
596 598
                     );
597 599
                 $old_groups = array();
598
-                while ($row = $modx->getDatabase()->getRow($rs)) $old_groups[$row['document_group']] = $row['id'];
600
+                while ($row = $modx->getDatabase()->getRow($rs)) {
601
+                    $old_groups[$row['document_group']] = $row['id'];
602
+                }
599 603
 
600 604
                 // update the permissions in the database
601 605
                 $insertions = $deletions = array();
@@ -657,9 +661,9 @@  discard block
 block discarded – undo
657 661
                 $modx->clearCache('full');
658 662
             }
659 663
 
660
-            if ($_POST['refresh_preview'] == '1')
661
-                $header = "Location: ".MODX_SITE_URL."index.php?id=$id&z=manprev";
662
-            else {
664
+            if ($_POST['refresh_preview'] == '1') {
665
+                            $header = "Location: ".MODX_SITE_URL."index.php?id=$id&z=manprev";
666
+            } else {
663 667
                 if ($_POST['stay'] != '2' && $id > 0) {
664 668
                     $modx->unlockElement(7, $id);
665 669
                 }
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.3.6.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 ?>
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.4.1.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 ?>
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.4.0.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 ?>
Please login to merge, or discard this patch.