Completed
Push — develop ( 053968...47dc8d )
by Maxim
12s
created
manager/includes/controls/contextmenu.php 4 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,4 +69,4 @@
 block discarded – undo
69 69
 		cm.style.visibility = 'hidden';
70 70
 	}
71 71
 </script>
72
-BLOCK;
72
+block;
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -4,71 +4,71 @@
 block discarded – undo
4 4
 $ContextMenuCnt = 0;
5 5
 
6 6
 class ContextMenu {
7
-	public $id;
7
+    public $id;
8 8
     /**
9 9
      * @var string
10 10
      */
11
-	public $html = '';
11
+    public $html = '';
12 12
     /**
13 13
      * @var bool
14 14
      */
15
-	public $visible = false;
15
+    public $visible = false;
16 16
     /**
17 17
      * @var int
18 18
      */
19
-	public $width = 120;
19
+    public $width = 120;
20 20
 
21 21
     public function __construct($id = '', $width = 120, $visible = false) {
22
-		global $ContextMenuCnt;
23
-		$ContextMenuCnt++;
24
-		$this->html = "";
25
-		$this->visible = $visible ? $visible : false;
26
-		$this->width = is_numeric($width) ? (int)$width : 120;
27
-		$this->id = $id ? $id : "cntxMnu" . $ContextMenuCnt;    // set id
28
-	}
22
+        global $ContextMenuCnt;
23
+        $ContextMenuCnt++;
24
+        $this->html = "";
25
+        $this->visible = $visible ? $visible : false;
26
+        $this->width = is_numeric($width) ? (int)$width : 120;
27
+        $this->id = $id ? $id : "cntxMnu" . $ContextMenuCnt;    // set id
28
+    }
29 29
 
30 30
     public function addItem($text, $action = "", $img = "", $disabled = 0) {
31
-		global $base_url, $_style;
31
+        global $base_url, $_style;
32 32
         if($disabled) {
33 33
             return;
34 34
         }
35
-		if(!$img) {
36
-			$img = $base_url . $_style['tx'];
37
-		}
38
-		if(substr($action, 0, 3) == "js:") {
39
-			$action = substr($action, 3);
40
-		} else if(substr($action, 0, 3) == "hl:") {
41
-			$action = "window.location.href='" . substr($action, 3) . "'";
42
-		} else {
43
-			$action = "window.location.href='" . $action . "'";
44
-		}
45
-		$action = " onmouseover=\"this.className='cntxMnuItemOver';\" onmouseout=\"this.className='cntxMnuItem';\" onclick=\"$action; hideCntxMenu('" . $this->id . "');\"";
46
-		$this->html .= "<div class='" . ($disabled ? "cntxMnuItemDisabled" : "cntxMnuItem") . "' $action>";
35
+        if(!$img) {
36
+            $img = $base_url . $_style['tx'];
37
+        }
38
+        if(substr($action, 0, 3) == "js:") {
39
+            $action = substr($action, 3);
40
+        } else if(substr($action, 0, 3) == "hl:") {
41
+            $action = "window.location.href='" . substr($action, 3) . "'";
42
+        } else {
43
+            $action = "window.location.href='" . $action . "'";
44
+        }
45
+        $action = " onmouseover=\"this.className='cntxMnuItemOver';\" onmouseout=\"this.className='cntxMnuItem';\" onclick=\"$action; hideCntxMenu('" . $this->id . "');\"";
46
+        $this->html .= "<div class='" . ($disabled ? "cntxMnuItemDisabled" : "cntxMnuItem") . "' $action>";
47 47
         if(substr($img, 0, 5) == 'fa fa') {
48 48
             $img = '<i class="' . $img . '"></i>';
49 49
         } else if(substr($img, 0, 1) != '<') {
50 50
             $img = '<img src="' . $img . '" />';
51 51
         }
52
-		$this->html .= $img . '&nbsp;' . $text . '</div>';
53
-	}
52
+        $this->html .= $img . '&nbsp;' . $text . '</div>';
53
+    }
54 54
 
55 55
     public function addSeparator() {
56
-		$this->html .= "
56
+        $this->html .= "
57 57
 			<div class='cntxMnuSeparator'></div>
58 58
 		";
59
-	}
59
+    }
60 60
 
61 61
     public function render() {
62
-		global $ContextMenuScript;
62
+        global $ContextMenuScript;
63 63
 
64
-		$html = $ContextMenuScript . "<div id='" . $this->id . "' class='contextMenu' style='width:" . $this->width . "px; visibility:" . ($this->visible ? 'visible' : 'hidden') . "'>" . $this->html . "</div>";
65
-		$ContextMenuScript = ""; // reset css
66
-		return $html;
67
-	}
64
+        $html = $ContextMenuScript . "<div id='" . $this->id . "' class='contextMenu' style='width:" . $this->width . "px; visibility:" . ($this->visible ? 'visible' : 'hidden') . "'>" . $this->html . "</div>";
65
+        $ContextMenuScript = ""; // reset css
66
+        return $html;
67
+    }
68 68
 
69 69
     public function getClientScriptObject() {
70
-		return "getCntxMenu('" . $this->id . "')";
71
-	}
70
+        return "getCntxMenu('" . $this->id . "')";
71
+    }
72 72
 }
73 73
 
74 74
 $ContextMenuScript = <<<BLOCK
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 global $ContextMenuCnt;
4 4
 $ContextMenuCnt = 0;
5 5
 
6
-class ContextMenu {
6
+class ContextMenu{
7 7
 	public $id;
8 8
     /**
9 9
      * @var string
@@ -18,56 +18,56 @@  discard block
 block discarded – undo
18 18
      */
19 19
 	public $width = 120;
20 20
 
21
-    public function __construct($id = '', $width = 120, $visible = false) {
21
+    public function __construct($id = '', $width = 120, $visible = false){
22 22
 		global $ContextMenuCnt;
23 23
 		$ContextMenuCnt++;
24 24
 		$this->html = "";
25 25
 		$this->visible = $visible ? $visible : false;
26
-		$this->width = is_numeric($width) ? (int)$width : 120;
27
-		$this->id = $id ? $id : "cntxMnu" . $ContextMenuCnt;    // set id
26
+		$this->width = is_numeric($width) ? (int) $width : 120;
27
+		$this->id = $id ? $id : "cntxMnu".$ContextMenuCnt; // set id
28 28
 	}
29 29
 
30
-    public function addItem($text, $action = "", $img = "", $disabled = 0) {
30
+    public function addItem($text, $action = "", $img = "", $disabled = 0){
31 31
 		global $base_url, $_style;
32
-        if($disabled) {
32
+        if ($disabled) {
33 33
             return;
34 34
         }
35
-		if(!$img) {
36
-			$img = $base_url . $_style['tx'];
35
+		if (!$img) {
36
+			$img = $base_url.$_style['tx'];
37 37
 		}
38
-		if(substr($action, 0, 3) == "js:") {
38
+		if (substr($action, 0, 3) == "js:") {
39 39
 			$action = substr($action, 3);
40
-		} else if(substr($action, 0, 3) == "hl:") {
41
-			$action = "window.location.href='" . substr($action, 3) . "'";
40
+		} else if (substr($action, 0, 3) == "hl:") {
41
+			$action = "window.location.href='".substr($action, 3)."'";
42 42
 		} else {
43
-			$action = "window.location.href='" . $action . "'";
43
+			$action = "window.location.href='".$action."'";
44 44
 		}
45
-		$action = " onmouseover=\"this.className='cntxMnuItemOver';\" onmouseout=\"this.className='cntxMnuItem';\" onclick=\"$action; hideCntxMenu('" . $this->id . "');\"";
46
-		$this->html .= "<div class='" . ($disabled ? "cntxMnuItemDisabled" : "cntxMnuItem") . "' $action>";
47
-        if(substr($img, 0, 5) == 'fa fa') {
48
-            $img = '<i class="' . $img . '"></i>';
49
-        } else if(substr($img, 0, 1) != '<') {
50
-            $img = '<img src="' . $img . '" />';
45
+		$action = " onmouseover=\"this.className='cntxMnuItemOver';\" onmouseout=\"this.className='cntxMnuItem';\" onclick=\"$action; hideCntxMenu('".$this->id."');\"";
46
+		$this->html .= "<div class='".($disabled ? "cntxMnuItemDisabled" : "cntxMnuItem")."' $action>";
47
+        if (substr($img, 0, 5) == 'fa fa') {
48
+            $img = '<i class="'.$img.'"></i>';
49
+        } else if (substr($img, 0, 1) != '<') {
50
+            $img = '<img src="'.$img.'" />';
51 51
         }
52
-		$this->html .= $img . '&nbsp;' . $text . '</div>';
52
+		$this->html .= $img.'&nbsp;'.$text.'</div>';
53 53
 	}
54 54
 
55
-    public function addSeparator() {
55
+    public function addSeparator(){
56 56
 		$this->html .= "
57 57
 			<div class='cntxMnuSeparator'></div>
58 58
 		";
59 59
 	}
60 60
 
61
-    public function render() {
61
+    public function render(){
62 62
 		global $ContextMenuScript;
63 63
 
64
-		$html = $ContextMenuScript . "<div id='" . $this->id . "' class='contextMenu' style='width:" . $this->width . "px; visibility:" . ($this->visible ? 'visible' : 'hidden') . "'>" . $this->html . "</div>";
64
+		$html = $ContextMenuScript."<div id='".$this->id."' class='contextMenu' style='width:".$this->width."px; visibility:".($this->visible ? 'visible' : 'hidden')."'>".$this->html."</div>";
65 65
 		$ContextMenuScript = ""; // reset css
66 66
 		return $html;
67 67
 	}
68 68
 
69
-    public function getClientScriptObject() {
70
-		return "getCntxMenu('" . $this->id . "')";
69
+    public function getClientScriptObject(){
70
+		return "getCntxMenu('".$this->id."')";
71 71
 	}
72 72
 }
73 73
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,7 +3,8 @@  discard block
 block discarded – undo
3 3
 global $ContextMenuCnt;
4 4
 $ContextMenuCnt = 0;
5 5
 
6
-class ContextMenu {
6
+class ContextMenu
7
+{
7 8
 	public $id;
8 9
     /**
9 10
      * @var string
@@ -18,7 +19,8 @@  discard block
 block discarded – undo
18 19
      */
19 20
 	public $width = 120;
20 21
 
21
-    public function __construct($id = '', $width = 120, $visible = false) {
22
+    public function __construct($id = '', $width = 120, $visible = false)
23
+    {
22 24
 		global $ContextMenuCnt;
23 25
 		$ContextMenuCnt++;
24 26
 		$this->html = "";
@@ -27,7 +29,8 @@  discard block
 block discarded – undo
27 29
 		$this->id = $id ? $id : "cntxMnu" . $ContextMenuCnt;    // set id
28 30
 	}
29 31
 
30
-    public function addItem($text, $action = "", $img = "", $disabled = 0) {
32
+    public function addItem($text, $action = "", $img = "", $disabled = 0)
33
+    {
31 34
 		global $base_url, $_style;
32 35
         if($disabled) {
33 36
             return;
@@ -52,13 +55,15 @@  discard block
 block discarded – undo
52 55
 		$this->html .= $img . '&nbsp;' . $text . '</div>';
53 56
 	}
54 57
 
55
-    public function addSeparator() {
58
+    public function addSeparator()
59
+    {
56 60
 		$this->html .= "
57 61
 			<div class='cntxMnuSeparator'></div>
58 62
 		";
59 63
 	}
60 64
 
61
-    public function render() {
65
+    public function render()
66
+    {
62 67
 		global $ContextMenuScript;
63 68
 
64 69
 		$html = $ContextMenuScript . "<div id='" . $this->id . "' class='contextMenu' style='width:" . $this->width . "px; visibility:" . ($this->visible ? 'visible' : 'hidden') . "'>" . $this->html . "</div>";
@@ -66,7 +71,8 @@  discard block
 block discarded – undo
66 71
 		return $html;
67 72
 	}
68 73
 
69
-    public function getClientScriptObject() {
74
+    public function getClientScriptObject()
75
+    {
70 76
 		return "getCntxMenu('" . $this->id . "')";
71 77
 	}
72 78
 }
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/OAuth.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,10 +128,10 @@
 block discarded – undo
128 128
         }
129 129
 
130 130
         return base64_encode(
131
-            'user=' .
132
-            $this->oauthUserEmail .
133
-            "\001auth=Bearer " .
134
-            $this->oauthToken .
131
+            'user='.
132
+            $this->oauthUserEmail.
133
+            "\001auth=Bearer ".
134
+            $this->oauthToken.
135 135
             "\001\001"
136 136
         );
137 137
     }
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
      */
35 35
     public function errorMessage()
36 36
     {
37
-        return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
37
+        return '<strong>'.htmlspecialchars($this->getMessage())."</strong><br />\n";
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
manager/includes/header.inc.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -363,10 +363,10 @@
 block discarded – undo
363 363
         stopWorker();
364 364
 
365 365
           <?php
366
-          if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
367
-              echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
368
-          }
369
-          ?>
366
+            if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
367
+                echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
368
+            }
369
+            ?>
370 370
 
371 371
         var actionButtons = document.getElementById('actions'), actionSelect = document.getElementById('stay');
372 372
         if (actionButtons !== null && actionSelect !== null) {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 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';
@@ -17,31 +17,31 @@  discard block
 block discarded – undo
17 17
 }
18 18
 
19 19
 if (!empty($_COOKIE['MODX_themeColor'])) {
20
-    $body_class .= ' ' . $_COOKIE['MODX_themeColor'];
20
+    $body_class .= ' '.$_COOKIE['MODX_themeColor'];
21 21
 }
22 22
 
23
-$css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
23
+$css = 'media/style/'.$modx->config['manager_theme'].'/style.css?v='.$lastInstallTime;
24 24
 
25 25
 if ($modx->config['manager_theme'] == 'default') {
26
-    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
-        require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
26
+    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
+        require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php';
28 28
         $minifier = new Formatter\CSSMinify();
29
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css');
30
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css');
31
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css');
32
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css');
33
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css');
34
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css');
35
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css');
36
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css');
37
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css');
38
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css');
39
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css');
29
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css');
30
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css');
31
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css');
32
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css');
33
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css');
34
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css');
35
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css');
36
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css');
37
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css');
38
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css');
39
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css');
40 40
         $css = $minifier->minify();
41
-        file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css);
41
+        file_put_contents(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css', $css);
42 42
     }
43
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
44
-        $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
43
+    if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) {
44
+        $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime;
45 45
     }
46 46
 }
47 47
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
57 57
     <link rel="stylesheet" type="text/css" href="<?= $css ?>" />
58 58
     <script type="text/javascript" src="media/script/tabpane.js"></script>
59
-    <?= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $modx->config['mgr_jquery_path']) ?>
59
+    <?= sprintf('<script type="text/javascript" src="%s"></script>'."\n", $modx->config['mgr_jquery_path']) ?>
60 60
     <?php if ($modx->config['show_picker'] != "0") { ?>
61 61
         <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js" type="text/javascript"></script>
62 62
     <?php } ?>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     <?php } ?>
69 69
 
70 70
     <!-- OnManagerMainFrameHeaderHTMLBlock -->
71
-    <?= $onManagerMainFrameHeaderHTMLBlock . "\n" ?>
71
+    <?= $onManagerMainFrameHeaderHTMLBlock."\n" ?>
72 72
 
73 73
     <script type="text/javascript">
74 74
       /* <![CDATA[ */
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
           <?php
366 366
           if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
367
-              echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
367
+              echo 'doRefresh('.$_REQUEST['r'].");\n";
368 368
           }
369 369
           ?>
370 370
 
Please login to merge, or discard this patch.
Braces   +8 added lines, -8 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,21 +9,21 @@  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 (!empty($_COOKIE['MODX_themeColor'])) {
19
+if (!empty($_COOKIE['MODX_themeColor'])) {
20 20
     $body_class .= ' ' . $_COOKIE['MODX_themeColor'];
21 21
 }
22 22
 
23 23
 $css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
24 24
 
25
-if ($modx->config['manager_theme'] == 'default') {
26
-    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')) {
25
+if ($modx->config['manager_theme'] == 'default') {
26
+    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 27
         require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
28 28
         $minifier = new Formatter\CSSMinify();
29 29
         $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $css = $minifier->minify();
41 41
         file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css);
42 42
     }
43
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
43
+    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
44 44
         $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
45 45
     }
46 46
 }
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         stopWorker();
364 364
 
365 365
           <?php
366
-          if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
366
+          if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
367 367
               echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
368 368
           }
369 369
           ?>
Please login to merge, or discard this patch.
manager/includes/version.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-$modx_version      = '1.5.0-beta';      // Current version number
3
-$modx_release_date = 'Jan 26, 2018';     // Date of release
4
-$modx_branch       = 'Evolution';        // Codebase name
2
+$modx_version      = '1.5.0-beta'; // Current version number
3
+$modx_release_date = 'Jan 26, 2018'; // Date of release
4
+$modx_branch       = 'Evolution'; // Codebase name
5 5
 $modx_full_appname = "{$modx_branch} {$modx_version} ({$modx_release_date})";
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_getimage.inc.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 $pattern = '/<img[\s\n]+.*src=[\s\n]*"([^"]+\.(jpg|jpeg|png|gif))"[^>]+>/i';
3
-preg_match_all($pattern , $value , $images);
4
-if($opt==='')
3
+preg_match_all($pattern, $value, $images);
4
+if ($opt === '')
5 5
 {
6
-    if($images[1][0])  return $images[1][0];
6
+    if ($images[1][0])  return $images[1][0];
7 7
     else               return '';
8 8
 }
9 9
 else
10 10
 {
11
-    foreach($images[0] as $i=>$image)
11
+    foreach ($images[0] as $i=>$image)
12 12
     {
13
-        if(strpos($image,$opt)!==false) return $images[1][$i];
13
+        if (strpos($image, $opt) !== false) return $images[1][$i];
14 14
     }
15 15
 }
16 16
 
Please login to merge, or discard this patch.
Braces   +11 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,16 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 $pattern = '/<img[\s\n]+.*src=[\s\n]*"([^"]+\.(jpg|jpeg|png|gif))"[^>]+>/i';
3 3
 preg_match_all($pattern , $value , $images);
4
-if($opt==='')
5
-{
6
-    if($images[1][0])  return $images[1][0];
7
-    else               return '';
8
-}
9
-else
10
-{
11
-    foreach($images[0] as $i=>$image)
12
-    {
13
-        if(strpos($image,$opt)!==false) return $images[1][$i];
4
+if($opt==='') {
5
+    if($images[1][0]) {
6
+        return $images[1][0];
7
+    } else {
8
+        return '';
9
+    }
10
+    } else {
11
+    foreach($images[0] as $i=>$image) {
12
+        if(strpos($image,$opt)!==false) {
13
+            return $images[1][$i];
14
+        }
14 15
     }
15 16
 }
16 17
 
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_wordwrap.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1 1
 <?php
2
-return preg_replace_callback("~(\b\w+\b)~",function($m) use($wrapat) {return wordwrap($m[1],$wrapat,' ',1);},$value);
2
+return preg_replace_callback("~(\b\w+\b)~", function($m) use($wrapat) {return wordwrap($m[1], $wrapat, ' ', 1); },$value);
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_addbreak.inc.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 $text = $modx->filter->parseDocumentSource($value);
3
-$text = str_replace(array("\r\n","\r"),"\n",$text);
3
+$text = str_replace(array("\r\n", "\r"), "\n", $text);
4 4
 
5 5
 $blockElms  = 'br,table,tbody,tr,td,th,thead,tfoot,caption,colgroup,div';
6 6
 $blockElms .= ',dl,dd,dt,ul,ol,li,pre,select,option,form,map,area,blockquote';
7 7
 $blockElms .= ',address,math,style,input,p,h1,h2,h3,h4,h5,h6,hr,object,param,embed';
8 8
 $blockElms .= ',noframes,noscript,section,article,aside,hgroup,footer,address,code';
9 9
 $blockElms = explode(',', $blockElms);
10
-$lines = explode("\n",$text);
10
+$lines = explode("\n", $text);
11 11
 $c = count($lines);
12
-foreach($lines as $i=>$line)
12
+foreach ($lines as $i=>$line)
13 13
 {
14 14
     $line = rtrim($line);
15
-    if($i===$c-1) break;
16
-    foreach($blockElms as $block)
15
+    if ($i === $c - 1) break;
16
+    foreach ($blockElms as $block)
17 17
     {
18
-        if(preg_match("@</?{$block}" . '[^>]*>$@',$line))
18
+        if (preg_match("@</?{$block}".'[^>]*>$@', $line))
19 19
             continue 2;
20 20
     }
21 21
     $lines[$i] = "{$line}<br />";
Please login to merge, or discard this patch.
Braces   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,14 +9,15 @@
 block discarded – undo
9 9
 $blockElms = explode(',', $blockElms);
10 10
 $lines = explode("\n",$text);
11 11
 $c = count($lines);
12
-foreach($lines as $i=>$line)
13
-{
12
+foreach($lines as $i=>$line) {
14 13
     $line = rtrim($line);
15
-    if($i===$c-1) break;
16
-    foreach($blockElms as $block)
17
-    {
18
-        if(preg_match("@</?{$block}" . '[^>]*>$@',$line))
19
-            continue 2;
14
+    if($i===$c-1) {
15
+        break;
16
+    }
17
+    foreach($blockElms as $block) {
18
+        if(preg_match("@</?{$block}" . '[^>]*>$@',$line)) {
19
+                    continue 2;
20
+        }
20 21
     }
21 22
     $lines[$i] = "{$line}<br />";
22 23
 }
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_memberof.inc.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,22 +2,22 @@
 block discarded – undo
2 2
 $userID = abs($modx->getLoginUserID('web'));
3 3
 $modx->qs_hash = md5($modx->qs_hash."^{$userID}^");
4 4
 
5
-$groupNames = ($this->strlen($opt) > 0 ) ? explode(',',$opt) : array();
5
+$groupNames = ($this->strlen($opt) > 0) ? explode(',', $opt) : array();
6 6
 
7 7
 // if $groupNames is not an array return false
8
-if(!is_array($groupNames)) return 0;
8
+if (!is_array($groupNames)) return 0;
9 9
 
10 10
 // Creates an array with all webgroups the user id is in
11 11
 if (isset($modx->filter->cache['mo'][$userID])) $grpNames = $modx->filter->cache['mo'][$userID];
12 12
 else {
13
-    $from = sprintf("[+prefix+]webgroup_names wgn INNER JOIN [+prefix+]web_groups wg ON wg.webgroup=wgn.id AND wg.webuser='%s'",$userID);
14
-    $rs = $modx->db->select('wgn.name',$from);
15
-    $modx->filter->cache['mo'][$userID] = $grpNames = $modx->db->getColumn('name',$rs);
13
+    $from = sprintf("[+prefix+]webgroup_names wgn INNER JOIN [+prefix+]web_groups wg ON wg.webgroup=wgn.id AND wg.webuser='%s'", $userID);
14
+    $rs = $modx->db->select('wgn.name', $from);
15
+    $modx->filter->cache['mo'][$userID] = $grpNames = $modx->db->getColumn('name', $rs);
16 16
 }
17 17
 
18 18
 // Check if a supplied group matches a webgroup from the array we just created
19
-foreach($groupNames as $k=>$v) {
20
-    if(in_array(trim($v),$grpNames)) return 1;
19
+foreach ($groupNames as $k=>$v) {
20
+    if (in_array(trim($v), $grpNames)) return 1;
21 21
 }
22 22
 
23 23
 // If we get here the above logic did not find a match, so return false
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,11 +5,14 @@  discard block
 block discarded – undo
5 5
 $groupNames = ($this->strlen($opt) > 0 ) ? explode(',',$opt) : array();
6 6
 
7 7
 // if $groupNames is not an array return false
8
-if(!is_array($groupNames)) return 0;
8
+if(!is_array($groupNames)) {
9
+    return 0;
10
+}
9 11
 
10 12
 // Creates an array with all webgroups the user id is in
11
-if (isset($modx->filter->cache['mo'][$userID])) $grpNames = $modx->filter->cache['mo'][$userID];
12
-else {
13
+if (isset($modx->filter->cache['mo'][$userID])) {
14
+    $grpNames = $modx->filter->cache['mo'][$userID];
15
+} else {
13 16
     $from = sprintf("[+prefix+]webgroup_names wgn INNER JOIN [+prefix+]web_groups wg ON wg.webgroup=wgn.id AND wg.webuser='%s'",$userID);
14 17
     $rs = $modx->db->select('wgn.name',$from);
15 18
     $modx->filter->cache['mo'][$userID] = $grpNames = $modx->db->getColumn('name',$rs);
@@ -17,8 +20,10 @@  discard block
 block discarded – undo
17 20
 
18 21
 // Check if a supplied group matches a webgroup from the array we just created
19 22
 foreach($groupNames as $k=>$v) {
20
-    if(in_array(trim($v),$grpNames)) return 1;
21
-}
23
+    if(in_array(trim($v),$grpNames)) {
24
+        return 1;
25
+    }
26
+    }
22 27
 
23 28
 // If we get here the above logic did not find a match, so return false
24 29
 return 0;
Please login to merge, or discard this patch.