Completed
Pull Request — develop (#518)
by Agel_Nash
05:24
created
manager/includes/controls/phpmailer/POP3.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -344,7 +344,8 @@
 block discarded – undo
344 344
     protected function sendString($string)
345 345
     {
346 346
         if ($this->pop_conn) {
347
-            if ($this->do_debug >= 2) { //Show client messages when debug >= 2
347
+            if ($this->do_debug >= 2) {
348
+//Show client messages when debug >= 2
348 349
                 echo 'Client -> Server: ', $string;
349 350
             }
350 351
 
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/PHPMailer.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2059,7 +2059,8 @@  discard block
 block discarded – undo
2059 2059
      */
2060 2060
     public function addrFormat($addr)
2061 2061
     {
2062
-        if (empty($addr[1])) { // No name provided
2062
+        if (empty($addr[1])) {
2063
+// No name provided
2063 2064
             return $this->secureHeader($addr[0]);
2064 2065
         }
2065 2066
 
@@ -3425,7 +3426,7 @@  discard block
 block discarded – undo
3425 3426
     {
3426 3427
         $this->RecipientsQueue = array_filter(
3427 3428
             $this->RecipientsQueue,
3428
-            function ($params) use ($kind) {
3429
+            function ($params) use ($kind){
3429 3430
                 return $params[0] != $kind;
3430 3431
             }
3431 3432
         );
Please login to merge, or discard this patch.
manager/includes/controls/datasetpager.class.php 1 patch
Braces   +21 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,7 +10,8 @@  discard block
 block discarded – undo
10 10
 
11 11
 $__DataSetPagerCnt = 0;
12 12
 
13
-class DataSetPager {
13
+class DataSetPager
14
+{
14 15
 
15 16
 	var $ds; // datasource
16 17
 	var $pageSize;
@@ -27,7 +28,8 @@  discard block
 block discarded – undo
27 28
 	var $selPageStyle;
28 29
 	var $selPageClass;
29 30
 
30
-	function __construct($id, $ds, $pageSize = 10, $pageNumber = -1) {
31
+	function __construct($id, $ds, $pageSize = 10, $pageNumber = -1)
32
+	{
31 33
 		global $_PAGE; // use view state object
32 34
 
33 35
 		global $__DataSetPagerCnt;
@@ -57,35 +59,42 @@  discard block
 block discarded – undo
57 59
 		$this->pager = '';
58 60
 	}
59 61
 
60
-	function getRenderedPager() {
62
+	function getRenderedPager()
63
+	{
61 64
 		return $this->pager;
62 65
 	}
63 66
 
64
-	function getRenderedRows() {
67
+	function getRenderedRows()
68
+	{
65 69
 		return $this->rows;
66 70
 	}
67 71
 
68
-	function setDataSource($ds) {
72
+	function setDataSource($ds)
73
+	{
69 74
 		$this->ds = $ds;
70 75
 	}
71 76
 
72
-	function setPageSize($ps) {
77
+	function setPageSize($ps)
78
+	{
73 79
 		$this->pageSize = $ps;
74 80
 	}
75 81
 
76
-	function setRenderRowFnc($fncName, $args = "") {
82
+	function setRenderRowFnc($fncName, $args = "")
83
+	{
77 84
 		$this->renderRowFnc = &$fncName;
78 85
 		$this->renderRowFncArgs = $args;    // extra agruments
79 86
 
80 87
 
81 88
 	}
82 89
 
83
-	function setRenderPagerFnc($fncName, $args = "") {
90
+	function setRenderPagerFnc($fncName, $args = "")
91
+	{
84 92
 		$this->renderPagerFnc = $fncName;
85 93
 		$this->renderPagerFncArgs = $args;    // extra agruments
86 94
 	}
87 95
 
88
-	function render() {
96
+	function render()
97
+	{
89 98
 		global $modx, $_PAGE;
90 99
 
91 100
 		$isDataset = $modx->db->isResult($this->ds);
@@ -137,8 +146,10 @@  discard block
 block discarded – undo
137 146
 					$url = $_SERVER['PHP_SELF'] . '?';
138 147
 				}
139 148
 				$i = 0;
140
-				foreach($_GET as $n => $v) if($n != 'dpgn' . $this->id) {
149
+				foreach($_GET as $n => $v) {
150
+				    if($n != 'dpgn' . $this->id) {
141 151
 					$i++;
152
+				}
142 153
 					$url .= (($i > 1) ? "&" : "") . "$n=$v";
143 154
 				}
144 155
 				if($i >= 1) {
Please login to merge, or discard this patch.
manager/includes/actionlist.inc.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
2
+if(IN_MANAGER_MODE!="true") {
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4
+}
3 5
 
4 6
 // action list
5 7
 $GLOBALS['action_list'] = array(
@@ -132,11 +134,14 @@  discard block
 block discarded – undo
132 134
 	'999'	=> 'Viewing test page',
133 135
 );
134 136
 
135
-function getAction($actionId, $itemid='') {
137
+function getAction($actionId, $itemid='')
138
+{
136 139
 	global $action_list;
137 140
 
138 141
 	$ret = sprintf($action_list[$actionId], $itemid);
139
-	if (!$ret) $ret = "Idle (unknown)";
142
+	if (!$ret) {
143
+	    $ret = "Idle (unknown)";
144
+	}
140 145
 
141 146
 	return $ret;
142 147
 }
Please login to merge, or discard this patch.
manager/includes/settings.inc.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
2
+if(IN_MANAGER_MODE!="true") {
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4
+}
3 5
 
4 6
 // get the settings from the database.
5 7
 $settings = array();
6
-if ($modx && count($modx->config)>0) $settings = $modx->config;
7
-else{
8
+if ($modx && count($modx->config)>0) {
9
+    $settings = $modx->config;
10
+} else {
8 11
 	$rs = $modx->db->select('setting_name, setting_value', $modx->getFullTableName('system_settings'));
9 12
 	while ($row = $modx->db->getRow($rs)) {
10 13
 		$settings[$row['setting_name']] = $row['setting_value'];
@@ -14,7 +17,9 @@  discard block
 block discarded – undo
14 17
 extract($settings, EXTR_OVERWRITE);
15 18
 
16 19
 // setup default site id - new installation should generate a unique id for the site.
17
-if(!isset($site_id)) $site_id = "MzGeQ2faT4Dw06+U49x3";
20
+if(!isset($site_id)) {
21
+    $site_id = "MzGeQ2faT4Dw06+U49x3";
22
+}
18 23
 
19 24
 
20 25
 ?>
21 26
\ No newline at end of file
Please login to merge, or discard this patch.
manager/includes/header.inc.php 1 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 (IN_MANAGER_MODE != "true") {
2
+if (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/manager.lockout.inc.php 1 patch
Braces   +11 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,7 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
2
+if(IN_MANAGER_MODE!="true") {
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4
+}
3 5
 
4
-if($modx->manager->action!='8' && isset($_SESSION['mgrValidated'])){
6
+if($modx->manager->action!='8' && isset($_SESSION['mgrValidated'])) {
5 7
     
6 8
     $homeurl = $modx->makeUrl($manager_login_startup>0 ? $manager_login_startup:$site_start);
7 9
     $logouturl = MODX_MANAGER_URL.'index.php?a=8';
@@ -33,8 +35,7 @@  discard block
 block discarded – undo
33 35
     	if(substr($target,0,6)==='@CHUNK') {
34 36
     		$target = trim(substr($target,7));
35 37
     		$lockout_tpl = $modx->getChunk($target);
36
-    	}
37
-    	elseif(substr($target,0,5)==='@FILE') {
38
+    	} elseif(substr($target,0,5)==='@FILE') {
38 39
     		$target = trim(substr($target,6));
39 40
     		$lockout_tpl = file_get_contents($target);
40 41
     	}
@@ -42,24 +43,20 @@  discard block
 block discarded – undo
42 43
     	$chunk = $modx->getChunk($target);
43 44
     	if($chunk!==false && !empty($chunk)) {
44 45
     		$lockout_tpl = $chunk;
45
-    	}
46
-    	elseif(is_file(MODX_BASE_PATH . $target)) {
46
+    	} elseif(is_file(MODX_BASE_PATH . $target)) {
47 47
     		$target = MODX_BASE_PATH . $target;
48 48
     		$lockout_tpl = file_get_contents($target);
49
-    	}
50
-    	elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) {
49
+    	} elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) {
51 50
     		$target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl';
52 51
     		$lockout_tpl = file_get_contents($target);
53
-    	}
54
-	elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) {
52
+    	} elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) {
55 53
 		$target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl';
56 54
 		$login_tpl = file_get_contents($target);
57
-	}
58
-    	elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible
55
+	} elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) {
56
+// ClipperCMS compatible
59 57
     		$target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html';
60 58
     		$lockout_tpl = file_get_contents($target);
61
-    	}
62
-    	else {
59
+    	} else {
63 60
     		$target = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl';
64 61
     		$lockout_tpl = file_get_contents($target);
65 62
     	}
Please login to merge, or discard this patch.
manager/includes/tmplvars.inc.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // DISPLAY FORM ELEMENTS
3
-function renderFormElement($field_type, $field_id, $default_text = '', $field_elements = '', $field_value = '', $field_style = '', $row = array(), $tvsArray = array()) {
3
+function renderFormElement($field_type, $field_id, $default_text = '', $field_elements = '', $field_value = '', $field_style = '', $row = array(), $tvsArray = array())
4
+{
4 5
 	global $modx;
5 6
 	global $_style;
6 7
 	global $_lang;
@@ -368,13 +369,16 @@  discard block
 block discarded – undo
368 369
 	return $field_html;
369 370
 } // end renderFormElement function
370 371
 
371
-function ParseIntputOptions($v) {
372
+function ParseIntputOptions($v)
373
+{
372 374
 	global $modx;
373 375
 	$a = array();
374 376
 	if(is_array($v)) {
375 377
 		return $v;
376 378
 	} else if($modx->db->isResult($v)) {
377
-		while($cols = $modx->db->getRow($v, 'num')) $a[] = $cols;
379
+		while($cols = $modx->db->getRow($v, 'num')) {
380
+		    $a[] = $cols;
381
+		}
378 382
 	} else {
379 383
 		$a = explode("||", $v);
380 384
 	}
Please login to merge, or discard this patch.
manager/includes/extenders/ex_maketable.inc.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
  * Time: 14:38
6 6
  */
7 7
 
8
-if (!include_once MODX_MANAGER_PATH . 'includes/extenders/maketable.class.php'){
8
+if (!include_once MODX_MANAGER_PATH . 'includes/extenders/maketable.class.php') {
9 9
     return false;
10
-}else{
10
+} else {
11 11
     $this->table= new MakeTable;
12 12
     return true;
13 13
 }
14 14
\ No newline at end of file
Please login to merge, or discard this patch.