Completed
Pull Request — develop (#689)
by Alexander
05:50
created
manager/includes/extenders/modifiers/mdf_moduser.inc.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
-$userid = (int)$value;
2
+$userid = (int) $value;
3 3
 if (!isset($modx->filter->cache['ui'][$userid])) {
4 4
     if ($userid < 0) $user = $modx->getWebUserInfo(abs($userid));
5 5
     else             $user = $modx->getUserInfo($userid);
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_summary.inc.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,43 +1,43 @@
 block discarded – undo
1 1
 <?php
2
-if(strpos($opt,',')) list($limit,$delim) = explode(',', $opt);
3
-elseif(preg_match('/^[1-9][0-9]*$/',$opt)) {$limit=$opt;$delim='';}
4
-else {$limit=124;$delim='';}
2
+if (strpos($opt, ',')) list($limit, $delim) = explode(',', $opt);
3
+elseif (preg_match('/^[1-9][0-9]*$/', $opt)) {$limit = $opt; $delim = ''; }
4
+else {$limit = 124; $delim = ''; }
5 5
 
6
-if($delim==='') $delim = $modx->config['manager_language']==='japanese-utf8' ? '。' : '.';
7
-$limit = (int)$limit;
6
+if ($delim === '') $delim = $modx->config['manager_language'] === 'japanese-utf8' ? '。' : '.';
7
+$limit = (int) $limit;
8 8
 
9 9
 $content = $modx->filter->parseDocumentSource($value);
10 10
 
11 11
 $content = strip_tags($content);
12 12
 
13
-$content = str_replace(array("\r\n","\r","\n","\t",'&nbsp;'),' ',$content);
14
-if(preg_match('/\s+/',$content))
15
-    $content = preg_replace('/\s+/',' ',$content);
13
+$content = str_replace(array("\r\n", "\r", "\n", "\t", '&nbsp;'), ' ', $content);
14
+if (preg_match('/\s+/', $content))
15
+    $content = preg_replace('/\s+/', ' ', $content);
16 16
 $content = trim($content);
17 17
 
18 18
 $pos = $modx->filter->strpos($content, $delim);
19 19
 
20
-if($pos!==false && $pos<$limit) {
20
+if ($pos !== false && $pos < $limit) {
21 21
     $_ = explode($delim, $content);
22 22
     $text = '';
23
-    foreach($_ as $v) {
24
-        if($limit <= $modx->filter->strlen($text.$v.$delim)) break;
23
+    foreach ($_ as $v) {
24
+        if ($limit <= $modx->filter->strlen($text.$v.$delim)) break;
25 25
         $text .= $v.$delim;
26 26
     }
27
-    if($text) $content = $text;
27
+    if ($text) $content = $text;
28 28
 }
29 29
 
30
-if($limit<$modx->filter->strlen($content) && strpos($content,' ')!==false) {
30
+if ($limit < $modx->filter->strlen($content) && strpos($content, ' ') !== false) {
31 31
     $_ = explode(' ', $content);
32 32
     $text = '';
33
-    foreach($_ as $v) {
34
-        if($limit <= $modx->filter->strlen($text.$v.' ')) break;
35
-        $text .= $v . ' ';
33
+    foreach ($_ as $v) {
34
+        if ($limit <= $modx->filter->strlen($text.$v.' ')) break;
35
+        $text .= $v.' ';
36 36
     }
37
-    if($text!=='') $content = $text;
37
+    if ($text !== '') $content = $text;
38 38
 }
39 39
 
40
-if($limit < $modx->filter->strlen($content)) $content = $modx->filter->substr($content, 0, $limit);
41
-if($modx->filter->substr($content,-1)==$delim) $content = rtrim($content,$delim) . $delim;
40
+if ($limit < $modx->filter->strlen($content)) $content = $modx->filter->substr($content, 0, $limit);
41
+if ($modx->filter->substr($content, -1) == $delim) $content = rtrim($content, $delim).$delim;
42 42
 
43 43
 return $content;
Please login to merge, or discard this patch.
manager/includes/extenders/dbapi.mysql.class.inc.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $pre = null,
31 31
         $charset = '',
32 32
         $connection_method = 'SET CHARACTER SET'
33
-    ) {
33
+    ){
34 34
         $this->config['host'] = $host ? $host : $GLOBALS['database_server'];
35 35
         $this->config['dbase'] = $dbase ? $dbase : $GLOBALS['dbase'];
36 36
         $this->config['user'] = $uid ? $uid : $GLOBALS['database_user'];
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                         $referer = $modx->htmlspecialchars($_SERVER['HTTP_REFERER']);
121 121
 
122 122
                         $modx->sendmail(array(
123
-                                'subject' => 'Missing to create the database connection! from ' . $modx->config['site_name'],
123
+                                'subject' => 'Missing to create the database connection! from '.$modx->config['site_name'],
124 124
                                 'body'    => "{$logtitle}\n{$request_uri}\n{$ua}\n{$referer}",
125 125
                                 'type'    => 'text'
126 126
                             )
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
         } else {
138 138
             $dbase = trim($dbase, '`'); // remove the `` chars
139 139
             if (!@ mysql_select_db($dbase, $this->conn)) {
140
-                $modx->messageQuit("Failed to select the database '" . $dbase . "'!");
140
+                $modx->messageQuit("Failed to select the database '".$dbase."'!");
141 141
                 exit;
142 142
             }
143 143
             @mysql_query("{$connection_method} {$charset}", $this->conn);
144 144
             $tend = $modx->getMicroTime();
145 145
             $totaltime = $tend - $tstart;
146 146
             if ($modx->dumpSQL) {
147
-                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Database connection</legend>" . sprintf("Database connection was created in %2.4f s",
148
-                        $totaltime) . "</fieldset><br />";
147
+                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Database connection</legend>".sprintf("Database connection was created in %2.4f s",
148
+                        $totaltime)."</fieldset><br />";
149 149
             }
150 150
             if (function_exists('mysql_set_charset')) {
151 151
                 mysql_set_charset($this->config['charset']);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                 case 1091:
226 226
                     break;
227 227
                 default:
228
-                    $modx->messageQuit('Execution of a query to the database failed - ' . $this->getLastError(), $sql);
228
+                    $modx->messageQuit('Execution of a query to the database failed - '.$this->getLastError(), $sql);
229 229
             }
230 230
         } else {
231 231
             $tend = $modx->getMicroTime();
@@ -239,24 +239,24 @@  discard block
 block discarded – undo
239 239
                     $debug_path[] = $line['function'];
240 240
                 }
241 241
                 $debug_path = implode(' > ', array_reverse($debug_path));
242
-                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Query " . ($modx->executedQueries + 1) . " - " . sprintf("%2.2f ms",
243
-                        $totaltime * 1000) . "</legend>";
244
-                $modx->queryCode .= $sql . '<br><br>';
242
+                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Query ".($modx->executedQueries + 1)." - ".sprintf("%2.2f ms",
243
+                        $totaltime * 1000)."</legend>";
244
+                $modx->queryCode .= $sql.'<br><br>';
245 245
                 if ($modx->event->name) {
246
-                    $modx->queryCode .= 'Current Event  => ' . $modx->event->name . '<br>';
246
+                    $modx->queryCode .= 'Current Event  => '.$modx->event->name.'<br>';
247 247
                 }
248 248
                 if ($modx->event->activePlugin) {
249
-                    $modx->queryCode .= 'Current Plugin => ' . $modx->event->activePlugin . '<br>';
249
+                    $modx->queryCode .= 'Current Plugin => '.$modx->event->activePlugin.'<br>';
250 250
                 }
251 251
                 if ($modx->currentSnippet) {
252
-                    $modx->queryCode .= 'Current Snippet => ' . $modx->currentSnippet . '<br>';
252
+                    $modx->queryCode .= 'Current Snippet => '.$modx->currentSnippet.'<br>';
253 253
                 }
254 254
                 if (stripos($sql, 'select') === 0) {
255
-                    $modx->queryCode .= 'Record Count => ' . $this->getRecordCount($result) . '<br>';
255
+                    $modx->queryCode .= 'Record Count => '.$this->getRecordCount($result).'<br>';
256 256
                 } else {
257
-                    $modx->queryCode .= 'Affected Rows => ' . $this->getAffectedRows() . '<br>';
257
+                    $modx->queryCode .= 'Affected Rows => '.$this->getAffectedRows().'<br>';
258 258
                 }
259
-                $modx->queryCode .= 'Functions Path => ' . $debug_path . '<br>';
259
+                $modx->queryCode .= 'Functions Path => '.$debug_path.'<br>';
260 260
                 $modx->queryCode .= "</fieldset><br />";
261 261
             }
262 262
             $modx->executedQueries = $modx->executedQueries + 1;
@@ -350,9 +350,9 @@  discard block
 block discarded – undo
350 350
                     if (is_null($value) || strtolower($value) === 'null') {
351 351
                         $flds = 'NULL';
352 352
                     } else {
353
-                        $flds = "'" . $value . "'";
353
+                        $flds = "'".$value."'";
354 354
                     }
355
-                    $fields[$key] = "`{$key}` = " . $flds;
355
+                    $fields[$key] = "`{$key}` = ".$flds;
356 356
                 }
357 357
                 $fields = implode(",", $fields);
358 358
             }
@@ -380,13 +380,13 @@  discard block
 block discarded – undo
380 380
                 $this->query("INSERT INTO {$intotable} {$fields}");
381 381
             } else {
382 382
                 if (empty($fromtable)) {
383
-                    $fields = "(`" . implode("`, `", array_keys($fields)) . "`) VALUES('" . implode("', '",
384
-                            array_values($fields)) . "')";
383
+                    $fields = "(`".implode("`, `", array_keys($fields))."`) VALUES('".implode("', '",
384
+                            array_values($fields))."')";
385 385
                     $rt = $this->query("INSERT INTO {$intotable} {$fields}");
386 386
                 } else {
387 387
                     if (version_compare($this->getVersion(), "4.0.14") >= 0) {
388 388
                         $fromtable = $this->replaceFullTableName($fromtable);
389
-                        $fields = "(" . implode(",", array_keys($fields)) . ")";
389
+                        $fields = "(".implode(",", array_keys($fields)).")";
390 390
                         $where = trim($where);
391 391
                         $limit = trim($limit);
392 392
                         if ($where !== '' && stripos($where, 'WHERE') !== 0) {
@@ -399,8 +399,8 @@  discard block
 block discarded – undo
399 399
                     } else {
400 400
                         $ds = $this->select($fromfields, $fromtable, $where, '', $limit);
401 401
                         while ($row = $this->getRow($ds)) {
402
-                            $fields = "(" . implode(",", array_keys($fields)) . ") VALUES('" . implode("', '",
403
-                                    $row) . "')";
402
+                            $fields = "(".implode(",", array_keys($fields)).") VALUES('".implode("', '",
403
+                                    $row)."')";
404 404
                             $rt = $this->query("INSERT INTO {$intotable} {$fields}");
405 405
                         }
406 406
                     }
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
     public function getInsertId($conn = null)
486 486
     {
487 487
         if (!is_resource($conn)) {
488
-            $conn =& $this->conn;
488
+            $conn = & $this->conn;
489 489
         }
490 490
 
491 491
         return mysql_insert_id($conn);
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
     public function getAffectedRows($conn = null)
499 499
     {
500 500
         if (!is_resource($conn)) {
501
-            $conn =& $this->conn;
501
+            $conn = & $this->conn;
502 502
         }
503 503
 
504 504
         return mysql_affected_rows($conn);
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
     public function getLastError($conn = null)
512 512
     {
513 513
         if (!is_resource($conn)) {
514
-            $conn =& $this->conn;
514
+            $conn = & $this->conn;
515 515
         }
516 516
 
517 517
         return mysql_error($conn);
Please login to merge, or discard this patch.
manager/includes/controls/datagrid.class.php 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@  discard block
 block discarded – undo
10 10
 
11 11
 $__DataGridCnt = 0;
12 12
 
13
-class DataGrid {
13
+class DataGrid{
14 14
 
15 15
 	public $ds; // datasource
16 16
     public $id;
17
-    public $pageSize;            // pager settings
17
+    public $pageSize; // pager settings
18 18
     public $pageNumber;
19 19
     public $pager;
20
-    public $pagerLocation;        // top-right, top-left, bottom-left, bottom-right, both-left, both-right
20
+    public $pagerLocation; // top-right, top-left, bottom-left, bottom-right, both-left, both-right
21 21
 
22 22
     public $cssStyle;
23 23
     public $cssClass;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public $colAligns;
36 36
     public $colWraps;
37 37
     public $colColors;
38
-    public $colTypes;            // coltype1, coltype2, etc or coltype1:format1, e.g. date:%Y %m
38
+    public $colTypes; // coltype1, coltype2, etc or coltype1:format1, e.g. date:%Y %m
39 39
 	// data type: integer,float,currency,date
40 40
 
41 41
     public $header;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public $cellPadding;
44 44
     public $cellSpacing;
45 45
 
46
-    public $rowAlign;            // vertical alignment: top, middle, bottom
46
+    public $rowAlign; // vertical alignment: top, middle, bottom
47 47
     public $rowIdField;
48 48
 
49 49
     public $pagerStyle;
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public $cdelim;
74 74
 
75
-    public function __construct($id, $ds, $pageSize = 20, $pageNumber = -1) {
75
+    public function __construct($id, $ds, $pageSize = 20, $pageNumber = -1){
76 76
 		global $__DataGridCnt;
77 77
 
78 78
 		// set id
79 79
 		$__DataGridCnt++;
80
-		$this->id = $this->id ? empty($id) : "dg" . $__DataGridCnt;
80
+		$this->id = $this->id ? empty($id) : "dg".$__DataGridCnt;
81 81
 
82 82
 		// set datasource
83 83
 		$this->ds = $ds;
@@ -88,50 +88,50 @@  discard block
 block discarded – undo
88 88
 		$this->pagerLocation = 'top-right';
89 89
 	}
90 90
 
91
-    public function setDataSource($ds) {
91
+    public function setDataSource($ds){
92 92
 		$this->ds = $ds;
93 93
 	}
94 94
 
95
-    public function render() {
95
+    public function render(){
96 96
 		global $modx;
97
-		$columnHeaderStyle = ($this->columnHeaderStyle) ? "style='" . $this->columnHeaderStyle . "'" : '';
98
-		$columnHeaderClass = ($this->columnHeaderClass) ? "class='" . $this->columnHeaderClass . "'" : "";
99
-		$cssStyle = ($this->cssStyle) ? "style='" . $this->cssStyle . "'" : '';
100
-		$cssClass = ($this->cssClass) ? "class='" . $this->cssClass . "'" : '';
97
+		$columnHeaderStyle = ($this->columnHeaderStyle) ? "style='".$this->columnHeaderStyle."'" : '';
98
+		$columnHeaderClass = ($this->columnHeaderClass) ? "class='".$this->columnHeaderClass."'" : "";
99
+		$cssStyle = ($this->cssStyle) ? "style='".$this->cssStyle."'" : '';
100
+		$cssClass = ($this->cssClass) ? "class='".$this->cssClass."'" : '';
101 101
 
102
-		$pagerClass = ($this->pagerClass) ? "class='" . $this->pagerClass . "'" : '';
103
-		$pagerStyle = ($this->pagerStyle) ? "style='" . $this->pagerStyle . "'" : "style='background-color:#ffffff;'";
102
+		$pagerClass = ($this->pagerClass) ? "class='".$this->pagerClass."'" : '';
103
+		$pagerStyle = ($this->pagerStyle) ? "style='".$this->pagerStyle."'" : "style='background-color:#ffffff;'";
104 104
 
105
-		$this->_itemStyle = ($this->itemStyle) ? "style='" . $this->itemStyle . "'" : '';
106
-		$this->_itemClass = ($this->itemClass) ? "class='" . $this->itemClass . "'" : '';
107
-		$this->_altItemStyle = ($this->altItemStyle) ? "style='" . $this->altItemStyle . "'" : '';
108
-		$this->_altItemClass = ($this->altItemClass) ? "class='" . $this->altItemClass . "'" : '';
105
+		$this->_itemStyle = ($this->itemStyle) ? "style='".$this->itemStyle."'" : '';
106
+		$this->_itemClass = ($this->itemClass) ? "class='".$this->itemClass."'" : '';
107
+		$this->_altItemStyle = ($this->altItemStyle) ? "style='".$this->altItemStyle."'" : '';
108
+		$this->_altItemClass = ($this->altItemClass) ? "class='".$this->altItemClass."'" : '';
109 109
 
110 110
 		$this->_alt = 0;
111 111
 		$this->_total = 0;
112 112
 
113 113
 		$this->_isDataset = $modx->db->isResult($this->ds); // if not dataset then treat as array
114 114
 
115
-		if(!$cssStyle && !$cssClass) {
115
+		if (!$cssStyle && !$cssClass) {
116 116
 			$cssStyle = "style='width:100%;border:1px solid silver;font-family:verdana,arial; font-size:11px;'";
117 117
 		}
118
-		if(!$columnHeaderStyle && !$columnHeaderClass) {
118
+		if (!$columnHeaderStyle && !$columnHeaderClass) {
119 119
 			$columnHeaderStyle = "style='color:black;background-color:silver'";
120 120
 		}
121
-		if(!$this->_itemStyle && !$this->_itemClass) {
121
+		if (!$this->_itemStyle && !$this->_itemClass) {
122 122
 			$this->_itemStyle = "style='color:black;'";
123 123
 		}
124
-		if(!$this->_altItemStyle && !$this->_altItemClass) {
124
+		if (!$this->_altItemStyle && !$this->_altItemClass) {
125 125
 			$this->_altItemStyle = "style='color:black;background-color:#eeeeee'";
126 126
 		}
127 127
 
128
-		if($this->_isDataset && !$this->columns) {
128
+		if ($this->_isDataset && !$this->columns) {
129 129
 			$cols = $modx->db->numFields($this->ds);
130
-			for($i = 0; $i < $cols; $i++) $this->columns .= ($i ? "," : "") . $modx->db->fieldName($this->ds, $i);
130
+			for ($i = 0; $i < $cols; $i++) $this->columns .= ($i ? "," : "").$modx->db->fieldName($this->ds, $i);
131 131
 		}
132 132
 
133 133
 		// start grid
134
-		$tblStart = "<table $cssClass $cssStyle cellpadding='" . (isset($this->cellPadding) ? (int) $this->cellPadding : 1) . "' cellspacing='" . (isset($this->cellSpacing) ? (int) $this->cellSpacing : 1) . "'>";
134
+		$tblStart = "<table $cssClass $cssStyle cellpadding='".(isset($this->cellPadding) ? (int) $this->cellPadding : 1)."' cellspacing='".(isset($this->cellSpacing) ? (int) $this->cellSpacing : 1)."'>";
135 135
 		$tblEnd = "</table>";
136 136
 
137 137
 		// build column header
@@ -142,33 +142,33 @@  discard block
 block discarded – undo
142 142
 		$this->_colcolors = explode((strstr($this->colColors, "||") !== false ? "||" : ","), $this->colColors);
143 143
 		$this->_coltypes = explode((strstr($this->colTypes, "||") !== false ? "||" : ","), $this->colTypes);
144 144
 		$this->_colcount = count($this->_colnames);
145
-		if(!$this->_isDataset) {
145
+		if (!$this->_isDataset) {
146 146
 			$this->ds = explode((strstr($this->ds, "||") !== false ? "||" : ","), $this->ds);
147 147
 			$this->ds = array_chunk($this->ds, $this->_colcount);
148 148
 		}
149 149
 		$tblColHdr = "<thead><tr>";
150
-		for($c = 0; $c < $this->_colcount; $c++) {
150
+		for ($c = 0; $c < $this->_colcount; $c++) {
151 151
 			$name = $this->_colnames[$c];
152 152
 			$width = $this->_colwidths[$c];
153
-			$tblColHdr .= "<td $columnHeaderStyle $columnHeaderClass" . ($width ? " width='$width'" : "") . ">$name</td>";
153
+			$tblColHdr .= "<td $columnHeaderStyle $columnHeaderClass".($width ? " width='$width'" : "").">$name</td>";
154 154
 		}
155 155
 		$tblColHdr .= "</tr></thead>\n";
156 156
 
157 157
 		// build rows
158 158
 		$rowcount = $this->_isDataset ? $modx->db->getRecordCount($this->ds) : count($this->ds);
159 159
 		$this->_fieldnames = explode(",", $this->fields);
160
-		if($rowcount == 0) {
161
-			$tblRows .= "<tr><td " . $this->_itemStyle . " " . $this->_itemClass . " colspan='" . $this->_colcount . "'>" . $this->noRecordMsg . "</td></tr>\n";
160
+		if ($rowcount == 0) {
161
+			$tblRows .= "<tr><td ".$this->_itemStyle." ".$this->_itemClass." colspan='".$this->_colcount."'>".$this->noRecordMsg."</td></tr>\n";
162 162
 		} else {
163 163
 			// render grid items
164
-			if($this->pageSize <= 0) {
165
-				for($r = 0; $r < $rowcount; $r++) {
164
+			if ($this->pageSize <= 0) {
165
+				for ($r = 0; $r < $rowcount; $r++) {
166 166
 					$row = $this->_isDataset ? $modx->db->getRow($this->ds) : $this->ds[$r];
167 167
 					$tblRows .= $this->RenderRowFnc($r + 1, $row);
168 168
 				}
169 169
 			} else {
170
-				if(!$this->pager) {
171
-					include_once dirname(__FILE__) . "/datasetpager.class.php";
170
+				if (!$this->pager) {
171
+					include_once dirname(__FILE__)."/datasetpager.class.php";
172 172
 					$this->pager = new DataSetPager($this->id, $this->ds, $this->pageSize, $this->pageNumber);
173 173
 					$this->pager->setRenderRowFnc($this); // pass this object
174 174
 					$this->pager->cssStyle = $pagerStyle;
@@ -188,18 +188,18 @@  discard block
 block discarded – undo
188 188
 		$o = $tblStart;
189 189
 		$ptop = (substr($this->pagerLocation, 0, 3) == "top") || (substr($this->pagerLocation, 0, 4) == "both");
190 190
 		$pbot = (substr($this->pagerLocation, 0, 3) == "bot") || (substr($this->pagerLocation, 0, 4) == "both");
191
-		if($this->header) {
192
-			$o .= "<tr><td bgcolor='#ffffff' colspan='" . $this->_colcount . "'>" . $this->header . "</td></tr>";
191
+		if ($this->header) {
192
+			$o .= "<tr><td bgcolor='#ffffff' colspan='".$this->_colcount."'>".$this->header."</td></tr>";
193 193
 		}
194
-		if($tblPager && $ptop) {
195
-			$o .= "<tr><td align='" . (substr($this->pagerLocation, -4) == "left" ? "left" : "right") . "' $pagerClass $pagerStyle colspan='" . $this->_colcount . "'>" . $tblPager . "&nbsp;</td></tr>";
194
+		if ($tblPager && $ptop) {
195
+			$o .= "<tr><td align='".(substr($this->pagerLocation, -4) == "left" ? "left" : "right")."' $pagerClass $pagerStyle colspan='".$this->_colcount."'>".$tblPager."&nbsp;</td></tr>";
196 196
 		}
197
-		$o .= $tblColHdr . $tblRows;
198
-		if($tblPager && $pbot) {
199
-			$o .= "<tr><td align='" . (substr($this->pagerLocation, -4) == "left" ? "left" : "right") . "' $pagerClass $pagerStyle colspan='" . $this->_colcount . "'>" . $tblPager . "&nbsp;</td></tr>";
197
+		$o .= $tblColHdr.$tblRows;
198
+		if ($tblPager && $pbot) {
199
+			$o .= "<tr><td align='".(substr($this->pagerLocation, -4) == "left" ? "left" : "right")."' $pagerClass $pagerStyle colspan='".$this->_colcount."'>".$tblPager."&nbsp;</td></tr>";
200 200
 		}
201
-		if($this->footer) {
202
-			$o .= "<tr><td bgcolor='#ffffff' colspan='" . $this->_colcount . "'>" . $this->footer . "</td></tr>";
201
+		if ($this->footer) {
202
+			$o .= "<tr><td bgcolor='#ffffff' colspan='".$this->_colcount."'>".$this->footer."</td></tr>";
203 203
 		}
204 204
 		$o .= $tblEnd;
205 205
 		return $o;
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
 
208 208
 	// format column values
209 209
 
210
-    public function RenderRowFnc($n, $row) {
211
-		if($this->_alt == 0) {
210
+    public function RenderRowFnc($n, $row){
211
+		if ($this->_alt == 0) {
212 212
 			$Style = $this->_itemStyle;
213 213
 			$Class = $this->_itemClass;
214 214
 			$this->_alt = 1;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 			$this->_alt = 0;
219 219
 		}
220 220
 		$o = "<tr>";
221
-		for($c = 0; $c < $this->_colcount; $c++) {
221
+		for ($c = 0; $c < $this->_colcount; $c++) {
222 222
 			$colStyle = $Style;
223 223
 			$fld = trim($this->_fieldnames[$c]);
224 224
 			$width = isset($this->_colwidths[$c]) ? $this->_colwidths[$c] : null;
@@ -227,67 +227,67 @@  discard block
 block discarded – undo
227 227
 			$type = isset($this->_coltypes[$c]) ? $this->_coltypes[$c] : null;
228 228
 			$nowrap = isset($this->_colwraps[$c]) ? $this->_colwraps[$c] : null;
229 229
 			$value = $row[($this->_isDataset && $fld ? $fld : $c)];
230
-			if($color && $Style) {
231
-				$colStyle = substr($colStyle, 0, -1) . ";background-color:$color;'";
230
+			if ($color && $Style) {
231
+				$colStyle = substr($colStyle, 0, -1).";background-color:$color;'";
232 232
 			}
233 233
 			$value = $this->formatColumnValue($row, $value, $type, $align);
234
-			$o .= "<td $colStyle $Class" . ($align ? " align='$align'" : "") . ($color ? " bgcolor='$color'" : "") . ($nowrap ? " nowrap='$nowrap'" : "") . ($width ? " width='$width'" : "") . ">$value</td>";
234
+			$o .= "<td $colStyle $Class".($align ? " align='$align'" : "").($color ? " bgcolor='$color'" : "").($nowrap ? " nowrap='$nowrap'" : "").($width ? " width='$width'" : "").">$value</td>";
235 235
 		}
236 236
 		$o .= "</tr>\n";
237 237
 		return $o;
238 238
 	}
239 239
 
240
-    public function formatColumnValue($row, $value, $type, &$align) {
241
-		if(strpos($type, ":") !== false) {
240
+    public function formatColumnValue($row, $value, $type, &$align){
241
+		if (strpos($type, ":") !== false) {
242 242
 			list($type, $type_format) = explode(":", $type, 2);
243 243
 		}
244
-		switch(strtolower($type)) {
244
+		switch (strtolower($type)) {
245 245
 			case "integer":
246
-				if($align == "") {
246
+				if ($align == "") {
247 247
 					$align = "right";
248 248
 				}
249 249
 				$value = number_format($value);
250 250
 				break;
251 251
 
252 252
 			case "float":
253
-				if($align == "") {
253
+				if ($align == "") {
254 254
 					$align = "right";
255 255
 				}
256
-				if(!$type_format) {
256
+				if (!$type_format) {
257 257
 					$type_format = 2;
258 258
 				}
259 259
 				$value = number_format($value, $type_format);
260 260
 				break;
261 261
 
262 262
 			case "currency":
263
-				if($align == "") {
263
+				if ($align == "") {
264 264
 					$align = "right";
265 265
 				}
266
-				if(!$type_format) {
266
+				if (!$type_format) {
267 267
 					$type_format = 2;
268 268
 				}
269
-				$value = "$" . number_format($value, $type_format);
269
+				$value = "$".number_format($value, $type_format);
270 270
 				break;
271 271
 
272 272
 			case "date":
273
-				if($align == "") {
273
+				if ($align == "") {
274 274
 					$align = "right";
275 275
 				}
276
-				if(!is_numeric($value)) {
276
+				if (!is_numeric($value)) {
277 277
 					$value = strtotime($value);
278 278
 				}
279
-				if(!$type_format) {
279
+				if (!$type_format) {
280 280
 					$type_format = "%A %d, %B %Y";
281 281
 				}
282 282
 				$value = strftime($type_format, $value);
283 283
 				break;
284 284
 
285 285
 			case "boolean":
286
-				if($align == '') {
286
+				if ($align == '') {
287 287
 					$align = "center";
288 288
 				}
289 289
 				$value = number_format($value);
290
-				if($value) {
290
+				if ($value) {
291 291
 					$value = '&bull;';
292 292
 				} else {
293 293
 					$value = '&nbsp;';
@@ -298,8 +298,8 @@  discard block
 block discarded – undo
298 298
 				// replace [+value+] first
299 299
 				$value = str_replace("[+value+]", $value, $type_format);
300 300
 				// replace other [+fields+]
301
-				if(strpos($value, "[+") !== false) {
302
-					foreach($row as $k => $v) {
301
+				if (strpos($value, "[+") !== false) {
302
+					foreach ($row as $k => $v) {
303 303
 						$value = str_replace("[+$k+]", $v, $value);
304 304
 					}
305 305
 				}
Please login to merge, or discard this patch.
manager/includes/controls/contextmenu.php 1 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.
manager/includes/controls/datasetpager.class.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 $__DataSetPagerCnt = 0;
12 12
 
13
-class DataSetPager {
13
+class DataSetPager{
14 14
 
15 15
 	public $ds; // datasource
16 16
     public $pageSize;
@@ -31,26 +31,26 @@  discard block
 block discarded – undo
31 31
     public $renderPagerFnc;
32 32
     public $renderPagerFncArgs;
33 33
 
34
-    public function __construct($id, $ds, $pageSize = 10, $pageNumber = -1) {
34
+    public function __construct($id, $ds, $pageSize = 10, $pageNumber = -1){
35 35
 		global $_PAGE; // use view state object
36 36
 
37 37
 		global $__DataSetPagerCnt;
38 38
 
39 39
 		// set id
40 40
 		$__DataSetPagerCnt++;
41
-		$this->id = !empty($id) ? $id : "dsp" . $__DataSetPagerCnt;
41
+		$this->id = !empty($id) ? $id : "dsp".$__DataSetPagerCnt;
42 42
 
43 43
 		// get pagenumber
44 44
 		// by setting pager to -1 cause pager to load it's last page number
45
-		if($pageNumber == -1) {
45
+		if ($pageNumber == -1) {
46 46
 			$pageNumber = 1;
47
-			if(isset($_GET["dpgn" . $this->id])) {
48
-				$pageNumber = $_GET["dpgn" . $this->id];
49
-			} elseif(isset($_PAGE['vs'][$id . '_dpgn'])) {
50
-				$pageNumber = $_PAGE['vs'][$id . '_dpgn'];
47
+			if (isset($_GET["dpgn".$this->id])) {
48
+				$pageNumber = $_GET["dpgn".$this->id];
49
+			} elseif (isset($_PAGE['vs'][$id.'_dpgn'])) {
50
+				$pageNumber = $_PAGE['vs'][$id.'_dpgn'];
51 51
 			}
52 52
 		}
53
-		if(!is_numeric($pageNumber)) {
53
+		if (!is_numeric($pageNumber)) {
54 54
 			$pageNumber = 1;
55 55
 		}
56 56
 
@@ -61,40 +61,40 @@  discard block
 block discarded – undo
61 61
 		$this->pager = '';
62 62
 	}
63 63
 
64
-    public function getRenderedPager() {
64
+    public function getRenderedPager(){
65 65
 		return $this->pager;
66 66
 	}
67 67
 
68
-    public function getRenderedRows() {
68
+    public function getRenderedRows(){
69 69
 		return $this->rows;
70 70
 	}
71 71
 
72
-    public function setDataSource($ds) {
72
+    public function setDataSource($ds){
73 73
 		$this->ds = $ds;
74 74
 	}
75 75
 
76
-    public function setPageSize($ps) {
76
+    public function setPageSize($ps){
77 77
 		$this->pageSize = $ps;
78 78
 	}
79 79
 
80
-    public function setRenderRowFnc($fncName, $args = "") {
80
+    public function setRenderRowFnc($fncName, $args = ""){
81 81
 		$this->renderRowFnc = &$fncName;
82
-		$this->renderRowFncArgs = $args;    // extra agruments
82
+		$this->renderRowFncArgs = $args; // extra agruments
83 83
 
84 84
 
85 85
 	}
86 86
 
87
-    public function setRenderPagerFnc($fncName, $args = "") {
87
+    public function setRenderPagerFnc($fncName, $args = ""){
88 88
 		$this->renderPagerFnc = $fncName;
89
-		$this->renderPagerFncArgs = $args;    // extra agruments
89
+		$this->renderPagerFncArgs = $args; // extra agruments
90 90
 	}
91 91
 
92
-    public function render() {
92
+    public function render(){
93 93
 		global $modx, $_PAGE;
94 94
 
95 95
 		$isDataset = $modx->db->isResult($this->ds);
96 96
 
97
-		if(!$this->selPageStyle) {
97
+		if (!$this->selPageStyle) {
98 98
 			$this->selPageStyle = "font-weight:bold";
99 99
 		}
100 100
 
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 		$tnr = ($isDataset) ? $modx->db->getRecordCount($this->ds) : count($this->ds);
103 103
 
104 104
 		// render: no records found
105
-		if($tnr <= 0) {
105
+		if ($tnr <= 0) {
106 106
 			$fnc = $this->renderRowFnc;
107 107
 			$args = $this->renderRowFncArgs;
108
-			if(isset($fnc)) {
109
-				if($args != "") {
108
+			if (isset($fnc)) {
109
+				if ($args != "") {
110 110
 					$this->rows .= $fnc(0, null, $args);
111 111
 				} // if agrs was specified then we will pass three params
112 112
 				else {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
 		// get total pages
120 120
 		$tp = ceil($tnr / $this->pageSize);
121
-		if($this->pageNumber > $tp) {
121
+		if ($this->pageNumber > $tp) {
122 122
 			$this->pageNumber = 1;
123 123
 		}
124 124
 
@@ -126,39 +126,39 @@  discard block
 block discarded – undo
126 126
 		$p = $this->pageNumber;
127 127
 
128 128
 		// save page number to view state if available
129
-		if(isset($_PAGE['vs'])) {
130
-			$_PAGE['vs'][$this->id . '_dpgn'] = $p;
129
+		if (isset($_PAGE['vs'])) {
130
+			$_PAGE['vs'][$this->id.'_dpgn'] = $p;
131 131
 		}
132 132
 
133 133
 		// render pager : renderPagerFnc($cuurentPage,$pagerNumber,$arguments="");
134
-		if($tp > 1) {
134
+		if ($tp > 1) {
135 135
 		    $url = '';
136 136
 			$fnc = $this->renderPagerFnc;
137 137
 			$args = $this->renderPagerFncArgs;
138
-			if(!isset($fnc)) {
139
-				if($modx->isFrontend()) {
140
-					$url = $modx->makeUrl($modx->documentIdentifier, '', '', 'full') . '?';
138
+			if (!isset($fnc)) {
139
+				if ($modx->isFrontend()) {
140
+					$url = $modx->makeUrl($modx->documentIdentifier, '', '', 'full').'?';
141 141
 				} else {
142
-					$url = $_SERVER['PHP_SELF'] . '?';
142
+					$url = $_SERVER['PHP_SELF'].'?';
143 143
 				}
144 144
 				$i = 0;
145
-				foreach($_GET as $n => $v) if($n != 'dpgn' . $this->id) {
145
+				foreach ($_GET as $n => $v) if ($n != 'dpgn'.$this->id) {
146 146
 					$i++;
147
-					$url .= (($i > 1) ? "&" : "") . "$n=$v";
147
+					$url .= (($i > 1) ? "&" : "")."$n=$v";
148 148
 				}
149
-				if($i >= 1) {
149
+				if ($i >= 1) {
150 150
 					$url .= "&";
151 151
 				}
152 152
 			}
153
-			for($i = 1; $i <= $tp; $i++) {
154
-				if(isset($fnc)) {
155
-					if($args != "") {
153
+			for ($i = 1; $i <= $tp; $i++) {
154
+				if (isset($fnc)) {
155
+					if ($args != "") {
156 156
 						$this->pager .= $fnc($p, $i, $args);
157 157
 					} else {
158 158
 						$this->pager .= $fnc($p, $i);
159 159
 					}
160 160
 				} else {
161
-					$this->pager .= ($p == $i) ? " <span class='" . $this->selPageClass . "' style='" . $this->selPageStyle . "'>$i</span> " : " <a href='" . $url . "dpgn" . $this->id . "=$i' class='" . $this->pageClass . "' style='" . $this->pageStyle . "'>$i</a> ";
161
+					$this->pager .= ($p == $i) ? " <span class='".$this->selPageClass."' style='".$this->selPageStyle."'>$i</span> " : " <a href='".$url."dpgn".$this->id."=$i' class='".$this->pageClass."' style='".$this->pageStyle."'>$i</a> ";
162 162
 				}
163 163
 			}
164 164
 		}
@@ -167,21 +167,21 @@  discard block
 block discarded – undo
167 167
 		$fnc = $this->renderRowFnc;
168 168
 		$args = $this->renderRowFncArgs;
169 169
 
170
-		if(isset($fnc)) {
170
+		if (isset($fnc)) {
171 171
 			$i = 1;
172 172
 			$fncObject = is_object($fnc);
173 173
 			$minitems = (($p - 1) * $this->pageSize) + 1;
174 174
 			$maxitems = (($p - 1) * $this->pageSize) + $this->pageSize;
175
-			while($i <= $maxitems && ($row = ($isDataset) ? $modx->db->getRow($this->ds) : $this->ds[$i - 1])) {
176
-				if($i >= $minitems && $i <= $maxitems) {
177
-					if($fncObject) {
178
-						if($args != "") {
175
+			while ($i <= $maxitems && ($row = ($isDataset) ? $modx->db->getRow($this->ds) : $this->ds[$i - 1])) {
176
+				if ($i >= $minitems && $i <= $maxitems) {
177
+					if ($fncObject) {
178
+						if ($args != "") {
179 179
 							$this->rows .= $fnc->RenderRowFnc($i, $row, $args);
180 180
 						} else {
181 181
 							$this->rows .= $fnc->RenderRowFnc($i, $row);
182 182
 						}
183 183
 					} else {
184
-						if($args != "") {
184
+						if ($args != "") {
185 185
 							$this->rows .= $fnc($i, $row, $args);
186 186
 						} // if agrs was specified then we wil pass three params
187 187
 						else {
Please login to merge, or discard this patch.
manager/includes/active_user_locks.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  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
 
6
-$lockElementId = (int)$lockElementId;
6
+$lockElementId = (int) $lockElementId;
7 7
 
8 8
 if ($lockElementId > 0) {
9 9
     ?>
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         var stay = document.getElementById('stay');
19 19
         // Trigger unlock
20 20
         if ((stay && stay.value !== '2') || !form_save) {
21
-          var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType;?>&id=<?php echo $lockElementId;?>&o=' + Math.random();
21
+          var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType; ?>&id=<?php echo $lockElementId; ?>&o=' + Math.random();
22 22
           if (navigator.sendBeacon) {
23 23
             navigator.sendBeacon(url)
24 24
           } else {
Please login to merge, or discard this patch.
manager/includes/menu.class.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
                 $countChild++;
68 68
                 $id = $value[0];
69 69
                 $ph['id'] = $id;
70
-                $ph['li_class'] = $this->get_li_class($id) . $value[10];
70
+                $ph['li_class'] = $this->get_li_class($id).$value[10];
71 71
                 $ph['href'] = $value[3];
72 72
                 $ph['alt'] = $value[4];
73 73
                 $ph['target'] = $value[7];
74 74
                 $ph['onclick'] = $value[5];
75 75
                 $ph['a_class'] = $this->get_a_class($id);
76 76
                 $ph['LinkAttr'] = $this->getLinkAttr($id);
77
-                $ph['itemName'] = $value[2] . $this->getItemName($id);
77
+                $ph['itemName'] = $value[2].$this->getItemName($id);
78 78
 
79 79
                 $ph['DrawSub'] = '';
80 80
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function get_li_class($id)
114 114
     {
115 115
         if (isset($this->menu[$id])) {
116
-            return $this->defaults['parentClass'] . ' ';
116
+            return $this->defaults['parentClass'].' ';
117 117
         } else {
118 118
             return '';
119 119
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     public function get_a_class($id)
123 123
     {
124 124
         if (isset($this->menu[$id])) {
125
-            return ' class="' . $this->defaults['parentLinkClass'] . '"';
125
+            return ' class="'.$this->defaults['parentLinkClass'].'"';
126 126
         } else {
127 127
             return '';
128 128
         }
Please login to merge, or discard this patch.
manager/index.php 1 patch
Spacing   +270 added lines, -270 removed lines patch added patch discarded remove patch
@@ -54,32 +54,32 @@  discard block
 block discarded – undo
54 54
 }
55 55
 
56 56
 // get start time
57
-$mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime;
57
+$mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime;
58 58
 $mstart = memory_get_usage();
59
-$self      = str_replace('\\','/',__FILE__);
60
-$self_dir  = str_replace('/index.php','',$self);
61
-$mgr_dir   = substr($self_dir,strrpos($self_dir,'/')+1);
62
-$base_path = str_replace($mgr_dir . '/index.php','',$self);
63
-$site_mgr_path = $base_path . 'assets/cache/siteManager.php';
64
-if(is_file($site_mgr_path)) include_once($site_mgr_path);
65
-$site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php';
66
-if(is_file($site_hostnames_path)) include_once($site_hostnames_path);
67
-if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) {
59
+$self      = str_replace('\\', '/', __FILE__);
60
+$self_dir  = str_replace('/index.php', '', $self);
61
+$mgr_dir   = substr($self_dir, strrpos($self_dir, '/') + 1);
62
+$base_path = str_replace($mgr_dir.'/index.php', '', $self);
63
+$site_mgr_path = $base_path.'assets/cache/siteManager.php';
64
+if (is_file($site_mgr_path)) include_once($site_mgr_path);
65
+$site_hostnames_path = $base_path.'assets/cache/siteHostnames.php';
66
+if (is_file($site_hostnames_path)) include_once($site_hostnames_path);
67
+if (!defined('MGR_DIR') || MGR_DIR !== $mgr_dir) {
68 68
 	$src = "<?php\n";
69 69
 	$src .= "define('MGR_DIR', '{$mgr_dir}');\n";
70
-	$rs = file_put_contents($site_mgr_path,$src);
71
-	if(!$rs) {
70
+	$rs = file_put_contents($site_mgr_path, $src);
71
+	if (!$rs) {
72 72
 		echo 'siteManager.php write error';
73 73
 		exit;
74 74
 	}
75 75
 	sleep(1);
76
-	header('Location:' . $_SERVER['REQUEST_URI']);
76
+	header('Location:'.$_SERVER['REQUEST_URI']);
77 77
 	exit;
78 78
 }
79 79
 
80 80
 // we use this to make sure files are accessed through
81 81
 // the manager instead of seperately.
82
-if ( ! defined('IN_MANAGER_MODE')) {
82
+if (!defined('IN_MANAGER_MODE')) {
83 83
 	define('IN_MANAGER_MODE', true);
84 84
 }
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 // send anti caching headers
90 90
 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
91
-header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
91
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
92 92
 header("Cache-Control: no-store, no-cache, must-revalidate");
93 93
 header("Cache-Control: post-check=0, pre-check=0", false);
94 94
 header("Pragma: no-cache");
@@ -100,29 +100,29 @@  discard block
 block discarded – undo
100 100
 include_once "includes/lang/english.inc.php";
101 101
 
102 102
 // check PHP version. EVO is compatible with php 5 (5.0.0+)
103
-$php_ver_comp =  version_compare(phpversion(), "5.0.0");
103
+$php_ver_comp = version_compare(phpversion(), "5.0.0");
104 104
 		// -1 if left is less, 0 if equal, +1 if left is higher
105
-if($php_ver_comp < 0) {
105
+if ($php_ver_comp < 0) {
106 106
 	echo sprintf($_lang['php_version_check'], phpversion());
107 107
 	exit;
108 108
 }
109 109
 
110 110
 // check if iconv is installed
111
-if(!function_exists('iconv')) {
111
+if (!function_exists('iconv')) {
112 112
 	echo $_lang['iconv_not_available'];
113 113
 	exit;
114 114
 }
115 115
 
116 116
 // set some runtime options
117
-$incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond
118
-set_include_path(get_include_path() . PATH_SEPARATOR . $incPath);
117
+$incPath = str_replace("\\", "/", dirname(__FILE__)."/includes/"); // Mod by Raymond
118
+set_include_path(get_include_path().PATH_SEPARATOR.$incPath);
119 119
 
120 120
 if (!defined('ENT_COMPAT')) define('ENT_COMPAT', 2);
121 121
 if (!defined('ENT_NOQUOTES')) define('ENT_NOQUOTES', 0);
122 122
 if (!defined('ENT_QUOTES')) define('ENT_QUOTES', 3);
123 123
 
124 124
 // set the document_root :|
125
-if(!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) {
125
+if (!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) {
126 126
 	$_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/";
127 127
 }
128 128
 
@@ -161,30 +161,30 @@  discard block
 block discarded – undo
161 161
 // Now that session is given get user settings and merge into $modx->config
162 162
 $usersettings = $modx->getUserSettings();
163 163
 
164
-$settings =& $modx->config;
164
+$settings = & $modx->config;
165 165
 extract($modx->config, EXTR_OVERWRITE);
166 166
 
167 167
 // now include_once different language file as english
168
-if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) {
168
+if (!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) {
169 169
 	$manager_language = "english"; // if not set, get the english language file.
170 170
 }
171 171
 
172 172
 // $length_eng_lang = count($_lang); // Not used for now, required for difference-check with other languages than english (i.e. inside installer)
173 173
 
174
-if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) {
174
+if ($manager_language != "english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) {
175 175
 	include_once "lang/".$manager_language.".inc.php";
176 176
 }
177 177
 
178 178
 // allow custom language overrides not altered by future EVO-updates
179
-if(file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) {
179
+if (file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) {
180 180
 	include_once "lang/override/".$manager_language.".inc.php";
181 181
 }
182 182
 
183 183
 $s = array('[+MGR_DIR+]');
184 184
 $r = array(MGR_DIR);
185
-foreach($_lang as $k=>$v)
185
+foreach ($_lang as $k=>$v)
186 186
 {
187
-	if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v);
187
+	if (strpos($v, '[+') !== false) $_lang[$k] = str_replace($s, $r, $v);
188 188
 }
189 189
 
190 190
 // send the charset header
@@ -198,19 +198,19 @@  discard block
 block discarded – undo
198 198
 include_once "accesscontrol.inc.php";
199 199
 
200 200
 // double check the session
201
-if(!isset($_SESSION['mgrValidated'])){
201
+if (!isset($_SESSION['mgrValidated'])) {
202 202
 	echo "Not Logged In!";
203 203
 	exit;
204 204
 }
205 205
 
206 206
 // include_once the style variables file
207
-if(isset($manager_theme) && !isset($_style)) {
207
+if (isset($manager_theme) && !isset($_style)) {
208 208
 	$_style = array();
209 209
 	include_once "media/style/".$manager_theme."/style.php";
210 210
 }
211 211
 
212 212
 // check if user is allowed to access manager interface
213
-if(isset($allow_manager_access) && $allow_manager_access==0) {
213
+if (isset($allow_manager_access) && $allow_manager_access == 0) {
214 214
 	include_once "manager.lockout.inc.php";
215 215
 }
216 216
 
@@ -219,21 +219,21 @@  discard block
 block discarded – undo
219 219
 $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque'];
220 220
 
221 221
 // first we check to see if this is a frameset request
222
-if(!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) {
222
+if (!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) {
223 223
 	// this looks to be a top-level frameset request, so let's serve up a frameset
224
-	if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) {
224
+	if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) {
225 225
 		include_once "media/style/".$manager_theme."/frames/1.php";
226
-	}else{
226
+	} else {
227 227
 		include_once "frames/1.php";
228 228
 	}
229 229
 	exit;
230 230
 }
231 231
 
232 232
 // OK, let's retrieve the action directive from the request
233
-$option = array('min_range'=>1,'max_range'=>2000);
234
-if(isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']);
235
-elseif(isset($_GET['a']))  $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option);
236
-elseif(isset($_POST['a'])) $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option);
233
+$option = array('min_range'=>1, 'max_range'=>2000);
234
+if (isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']);
235
+elseif (isset($_GET['a']))  $action = filter_input(INPUT_GET, 'a', FILTER_VALIDATE_INT, $option);
236
+elseif (isset($_POST['a'])) $action = filter_input(INPUT_POST, 'a', FILTER_VALIDATE_INT, $option);
237 237
 else                       $action = null;
238 238
 
239 239
 if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) {
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 $modx->manager->action = $action;
245 245
 
246 246
 // attempt to foil some simple types of CSRF attacks
247
-if (isset($modx->config['validate_referer']) && (int)$modx->config['validate_referer']) {
247
+if (isset($modx->config['validate_referer']) && (int) $modx->config['validate_referer']) {
248 248
 	if (isset($_SERVER['HTTP_REFERER'])) {
249 249
 		$referer = $_SERVER['HTTP_REFERER'];
250 250
 
@@ -264,11 +264,11 @@  discard block
 block discarded – undo
264 264
 $modx->invokeEvent("OnManagerPageInit", array("action" => $action));
265 265
 
266 266
 // return element filepath
267
-function includeFileProcessor ($filepath,$manager_theme) {
267
+function includeFileProcessor($filepath, $manager_theme){
268 268
 	$element = "";
269
-	if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) {
269
+	if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) {
270 270
 		$element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath;
271
-	}else{
271
+	} else {
272 272
 		$element = $filepath;
273 273
 	}
274 274
 	return $element;
@@ -281,341 +281,341 @@  discard block
 block discarded – undo
281 281
 /********************************************************************/
282 282
 	case 1 :
283 283
 		// get the requested frame
284
-		$frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']);
285
-		if($frame>9) {
286
-			$enable_debug=false;    // this is to stop the debug thingy being attached to the framesets
284
+		$frame = preg_replace('/[^a-z0-9]/i', '', $_REQUEST['f']);
285
+		if ($frame > 9) {
286
+			$enable_debug = false; // this is to stop the debug thingy being attached to the framesets
287 287
 		}
288
-		include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme));
288
+		include_once(includeFileProcessor("frames/".$frame.".php", $manager_theme));
289 289
 	break;
290 290
 /********************************************************************/
291 291
 /* show the homepage                                                */
292 292
 /********************************************************************/
293 293
 	case 2:
294 294
 		// get the home page
295
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
296
-		include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme));
297
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
295
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
296
+		include_once(includeFileProcessor("actions/welcome.static.php", $manager_theme));
297
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
298 298
 	break;
299 299
 /********************************************************************/
300 300
 /* document data                                                    */
301 301
 /********************************************************************/
302 302
 	case 3:
303 303
 		// get the page to show document's data
304
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
305
-		include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme));
306
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
304
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
305
+		include_once(includeFileProcessor("actions/document_data.static.php", $manager_theme));
306
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
307 307
 	break;
308 308
 /********************************************************************/
309 309
 /* content management                                               */
310 310
 /********************************************************************/
311 311
 	case 85:
312 312
 		// get the mutate page for adding a folder
313
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
314
-		include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme));
315
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
313
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
314
+		include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme));
315
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
316 316
 	break;
317 317
 	case 27:
318 318
 		// get the mutate page for changing content
319
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
320
-		include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme));
321
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
319
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
320
+		include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme));
321
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
322 322
 	break;
323 323
 	case 4:
324 324
 		// get the mutate page for adding content
325
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
326
-		include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme));
327
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
325
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
326
+		include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme));
327
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
328 328
 	break;
329 329
 	case 5:
330 330
 		// get the save processor
331
-		include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme));
331
+		include_once(includeFileProcessor("processors/save_content.processor.php", $manager_theme));
332 332
 	break;
333 333
 	case 6:
334 334
 		// get the delete processor
335
-		include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme));
335
+		include_once(includeFileProcessor("processors/delete_content.processor.php", $manager_theme));
336 336
 	break;
337 337
 	case 63:
338 338
 		// get the undelete processor
339
-		include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme));
339
+		include_once(includeFileProcessor("processors/undelete_content.processor.php", $manager_theme));
340 340
 	break;
341 341
 	case 51:
342 342
 		// get the move action
343
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
344
-		include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme));
345
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
343
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
344
+		include_once(includeFileProcessor("actions/move_document.dynamic.php", $manager_theme));
345
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
346 346
 	break;
347 347
 	case 52:
348 348
 		// get the move document processor
349
-		include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme));
349
+		include_once(includeFileProcessor("processors/move_document.processor.php", $manager_theme));
350 350
 	break;
351 351
 	case 61:
352 352
 		// get the processor for publishing content
353
-		include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme));
353
+		include_once(includeFileProcessor("processors/publish_content.processor.php", $manager_theme));
354 354
 	break;
355 355
 	case 62:
356 356
 		// get the processor for publishing content
357
-		include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme));
357
+		include_once(includeFileProcessor("processors/unpublish_content.processor.php", $manager_theme));
358 358
 	break;
359 359
 	case 56:
360 360
 		// get the sort menuindex action
361
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
362
-		include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme));
363
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
361
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
362
+		include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php", $manager_theme));
363
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
364 364
 		break;
365 365
 /********************************************************************/
366 366
 /* show the wait page - gives the tree time to refresh (hopefully)  */
367 367
 /********************************************************************/
368 368
 	case 7:
369 369
 		// get the wait page (so the tree can reload)
370
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
371
-		include_once(includeFileProcessor("actions/wait.static.php",$manager_theme));
372
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
370
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
371
+		include_once(includeFileProcessor("actions/wait.static.php", $manager_theme));
372
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
373 373
 	break;
374 374
 /********************************************************************/
375 375
 /* let the user log out                                             */
376 376
 /********************************************************************/
377 377
 	case 8:
378 378
 		// get the logout processor
379
-		include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme));
379
+		include_once(includeFileProcessor("processors/logout.processor.php", $manager_theme));
380 380
 	break;
381 381
 /********************************************************************/
382 382
 /* user management                                                  */
383 383
 /********************************************************************/
384 384
 	case 87:
385 385
 		// get the new web user page
386
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
387
-		include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme));
388
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
386
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
387
+		include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme));
388
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
389 389
 	break;
390 390
 	case 88:
391 391
 		// get the edit web user page
392
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
393
-		include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme));
394
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
392
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
393
+		include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme));
394
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
395 395
 	break;
396 396
 	case 89:
397 397
 		// get the save web user processor
398
-		include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme));
398
+		include_once(includeFileProcessor("processors/save_web_user.processor.php", $manager_theme));
399 399
 	break;
400 400
 	case 90:
401 401
 		// get the delete web user page
402
-		include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme));
402
+		include_once(includeFileProcessor("processors/delete_web_user.processor.php", $manager_theme));
403 403
 	break;
404 404
 	case 11:
405 405
 		// get the new user page
406
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
407
-		include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme));
408
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
406
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
407
+		include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme));
408
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
409 409
 	break;
410 410
 	case 12:
411 411
 		// get the edit user page
412
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
413
-		include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme));
414
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
412
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
413
+		include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme));
414
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
415 415
 	break;
416 416
 	case 32:
417 417
 		// get the save user processor
418
-		include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme));
418
+		include_once(includeFileProcessor("processors/save_user.processor.php", $manager_theme));
419 419
 	break;
420 420
 	case 28:
421 421
 		// get the change password page
422
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
423
-		include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme));
424
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
422
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
423
+		include_once(includeFileProcessor("actions/mutate_password.dynamic.php", $manager_theme));
424
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
425 425
 	break;
426 426
 	case 34:
427 427
 		// get the save new password page
428
-		include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme));
428
+		include_once(includeFileProcessor("processors/save_password.processor.php", $manager_theme));
429 429
 	break;
430 430
 	case 33:
431 431
 		// get the delete user page
432
-		include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme));
432
+		include_once(includeFileProcessor("processors/delete_user.processor.php", $manager_theme));
433 433
 	break;
434 434
 /********************************************************************/
435 435
 /* role management                                                  */
436 436
 /********************************************************************/
437 437
 	case 38:
438 438
 		// get the new role page
439
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
440
-		include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme));
441
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
439
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
440
+		include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme));
441
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
442 442
 	break;
443 443
 	case 35:
444 444
 		// get the edit role page
445
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
446
-		include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme));
447
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
445
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
446
+		include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme));
447
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
448 448
 	break;
449 449
 	case 36:
450 450
 		// get the save role page
451
-		include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme));
451
+		include_once(includeFileProcessor("processors/save_role.processor.php", $manager_theme));
452 452
 	break;
453 453
 	case 37:
454 454
 		// get the delete role page
455
-		include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme));
455
+		include_once(includeFileProcessor("processors/delete_role.processor.php", $manager_theme));
456 456
 	break;
457 457
 /********************************************************************/
458 458
 /* category management                                               */
459 459
 /********************************************************************/
460 460
 	case 120:
461 461
 		// get the edit category page
462
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
463
-		include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme));
464
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
462
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
463
+		include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme));
464
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
465 465
 	break;
466 466
 	case 121:
467 467
 		// for ajax-requests
468
-		include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme));
468
+		include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme));
469 469
 	break;
470 470
 /********************************************************************/
471 471
 /* template management                                              */
472 472
 /********************************************************************/
473 473
 	case 16:
474 474
 		// get the edit template action
475
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
476
-		include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme));
477
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
475
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
476
+		include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme));
477
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
478 478
 	break;
479 479
 	case 19:
480 480
 		// get the new template action
481
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
482
-		include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme));
483
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
481
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
482
+		include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme));
483
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
484 484
 	break;
485 485
 	case 20:
486 486
 		// get the save processor
487
-		include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme));
487
+		include_once(includeFileProcessor("processors/save_template.processor.php", $manager_theme));
488 488
 	break;
489 489
 	case 21:
490 490
 		// get the delete processor
491
-		include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme));
491
+		include_once(includeFileProcessor("processors/delete_template.processor.php", $manager_theme));
492 492
 	break;
493 493
 	case 96:
494 494
 		// get the duplicate template processor
495
-		include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme));
495
+		include_once(includeFileProcessor("processors/duplicate_template.processor.php", $manager_theme));
496 496
 	break;
497 497
 	case 117:
498 498
 		// change the tv rank for selected template
499
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
500
-		include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme));
501
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
499
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
500
+		include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php", $manager_theme));
501
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
502 502
 		break;
503 503
 /********************************************************************/
504 504
 /* snippet management                                               */
505 505
 /********************************************************************/
506 506
 	case 22:
507 507
 		// get the edit snippet action
508
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
509
-		include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme));
510
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
508
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
509
+		include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme));
510
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
511 511
 	break;
512 512
 	case 23:
513 513
 		// get the new snippet action
514
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
515
-		include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme));
516
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
514
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
515
+		include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme));
516
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
517 517
 	break;
518 518
 	case 24:
519 519
 		// get the save processor
520
-		include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme));
520
+		include_once(includeFileProcessor("processors/save_snippet.processor.php", $manager_theme));
521 521
 	break;
522 522
 	case 25:
523 523
 		// get the delete processor
524
-		include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme));
524
+		include_once(includeFileProcessor("processors/delete_snippet.processor.php", $manager_theme));
525 525
 	break;
526 526
 	case 98:
527 527
 		// get the duplicate processor
528
-		include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme));
528
+		include_once(includeFileProcessor("processors/duplicate_snippet.processor.php", $manager_theme));
529 529
 	break;
530 530
 /********************************************************************/
531 531
 /* htmlsnippet management                                               */
532 532
 /********************************************************************/
533 533
 	case 78:
534 534
 		// get the edit snippet action
535
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
536
-		include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme));
537
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
535
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
536
+		include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme));
537
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
538 538
 	break;
539 539
 	case 77:
540 540
 		// get the new snippet action
541
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
542
-		include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme));
543
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
541
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
542
+		include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme));
543
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
544 544
 	break;
545 545
 	case 79:
546 546
 		// get the save processor
547
-		include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme));
547
+		include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php", $manager_theme));
548 548
 	break;
549 549
 	case 80:
550 550
 		// get the delete processor
551
-		include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme));
551
+		include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php", $manager_theme));
552 552
 	break;
553 553
 	case 97:
554 554
 		// get the duplicate processor
555
-		include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme));
555
+		include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php", $manager_theme));
556 556
 	break;
557 557
 /********************************************************************/
558 558
 /* show the credits page                                            */
559 559
 /********************************************************************/
560 560
 	case 18:
561 561
 		// get the credits page
562
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
563
-		include_once(includeFileProcessor("actions/credits.static.php",$manager_theme));
564
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
562
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
563
+		include_once(includeFileProcessor("actions/credits.static.php", $manager_theme));
564
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
565 565
 	break;
566 566
 /********************************************************************/
567 567
 /* empty cache & synchronisation                                    */
568 568
 /********************************************************************/
569 569
 	case 26:
570 570
 		// get the cache emptying processor
571
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
572
-		include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme));
573
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
571
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
572
+		include_once(includeFileProcessor("actions/refresh_site.dynamic.php", $manager_theme));
573
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
574 574
 	break;
575 575
 /********************************************************************/
576 576
 /* Module management                                                */
577 577
 /********************************************************************/
578 578
 	case 106:
579 579
 		// get module management
580
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
581
-		include_once(includeFileProcessor("actions/modules.static.php",$manager_theme));
582
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
580
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
581
+		include_once(includeFileProcessor("actions/modules.static.php", $manager_theme));
582
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
583 583
 	break;
584 584
 	case 107:
585 585
 		// get the new module action
586
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
587
-		include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme));
588
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
586
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
587
+		include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme));
588
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
589 589
 	break;
590 590
 	case 108:
591 591
 		// get the edit module action
592
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
593
-		include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme));
594
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
592
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
593
+		include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme));
594
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
595 595
 	break;
596 596
 	case 109:
597 597
 		// get the save processor
598
-		include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme));
598
+		include_once(includeFileProcessor("processors/save_module.processor.php", $manager_theme));
599 599
 	break;
600 600
 	case 110:
601 601
 		// get the delete processor
602
-		include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme));
602
+		include_once(includeFileProcessor("processors/delete_module.processor.php", $manager_theme));
603 603
 	break;
604 604
 	case 111:
605 605
 		// get the duplicate processor
606
-		include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme));
606
+		include_once(includeFileProcessor("processors/duplicate_module.processor.php", $manager_theme));
607 607
 	break;
608 608
 	case 112:
609 609
 		// execute/run the module
610 610
 		//include_once "header.inc.php";
611
-		include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme));
611
+		include_once(includeFileProcessor("processors/execute_module.processor.php", $manager_theme));
612 612
 		//include_once "footer.inc.php";
613 613
 		break;
614 614
 	case 113:
615 615
 		// get the module resources (dependencies) action
616
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
617
-		include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme));
618
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
616
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
617
+		include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php", $manager_theme));
618
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
619 619
 	break;
620 620
 /********************************************************************/
621 621
 /* plugin management                                                */
@@ -623,46 +623,46 @@  discard block
 block discarded – undo
623 623
 	case 100:
624 624
 		// change the plugin priority
625 625
 		//include_once "header.inc.php"; - in action file
626
-		include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme));
627
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
626
+		include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php", $manager_theme));
627
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
628 628
 	break;
629 629
 	case 101:
630 630
 		// get the new plugin action
631
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
632
-		include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme));
633
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
631
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
632
+		include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme));
633
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
634 634
 	break;
635 635
 	case 102:
636 636
 		// get the edit plugin action
637
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
638
-		include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme));
639
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
637
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
638
+		include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme));
639
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
640 640
 	break;
641 641
 	case 103:
642 642
 		// get the save processor
643
-		include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme));
643
+		include_once(includeFileProcessor("processors/save_plugin.processor.php", $manager_theme));
644 644
 	break;
645 645
 	case 104:
646 646
 		// get the delete processor
647
-		include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme));
647
+		include_once(includeFileProcessor("processors/delete_plugin.processor.php", $manager_theme));
648 648
 	break;
649 649
 	case 105:
650 650
 		// get the duplicate processor
651
-		include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme));
651
+		include_once(includeFileProcessor("processors/duplicate_plugin.processor.php", $manager_theme));
652 652
 	break;
653 653
 	case 119:
654 654
 		// get the purge processor
655
-		include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme));
655
+		include_once(includeFileProcessor("processors/purge_plugin.processor.php", $manager_theme));
656 656
 	break;
657 657
 /********************************************************************/
658 658
 /* view phpinfo                                                     */
659 659
 /********************************************************************/
660 660
 	case 200:
661 661
 		// show phpInfo
662
-		if($modx->hasPermission('logs')) {
663
-			include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
664
-			include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme));
665
-			include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
662
+		if ($modx->hasPermission('logs')) {
663
+			include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
664
+			include_once(includeFileProcessor("actions/phpinfo.static.php", $manager_theme));
665
+			include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
666 666
 		}
667 667
 	break;
668 668
 /********************************************************************/
@@ -670,320 +670,320 @@  discard block
 block discarded – undo
670 670
 /********************************************************************/
671 671
 	case 29:
672 672
 		// get the error page
673
-		include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme));
673
+		include_once(includeFileProcessor("actions/error_dialog.static.php", $manager_theme));
674 674
 	break;
675 675
 /********************************************************************/
676 676
 /* file manager                                                     */
677 677
 /********************************************************************/
678 678
 	case 31:
679 679
 		// get the page to manage files
680
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
681
-		include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme));
682
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
680
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
681
+		include_once(includeFileProcessor("actions/files.dynamic.php", $manager_theme));
682
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
683 683
 	break;
684 684
 /********************************************************************/
685 685
 /* access permissions                                               */
686 686
 /********************************************************************/
687 687
 	case 40:
688
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
689
-		include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme));
690
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
688
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
689
+		include_once(includeFileProcessor("actions/access_permissions.dynamic.php", $manager_theme));
690
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
691 691
 	break;
692 692
 	case 91:
693
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
694
-		include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme));
695
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
693
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
694
+		include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php", $manager_theme));
695
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
696 696
 	break;
697 697
 /********************************************************************/
698 698
 /* access groups processor                                          */
699 699
 /********************************************************************/
700 700
 	case 41:
701
-		include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme));
701
+		include_once(includeFileProcessor("processors/access_groups.processor.php", $manager_theme));
702 702
 	break;
703 703
 	case 92:
704
-		include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme));
704
+		include_once(includeFileProcessor("processors/web_access_groups.processor.php", $manager_theme));
705 705
 	break;
706 706
 /********************************************************************/
707 707
 /* settings editor                                                  */
708 708
 /********************************************************************/
709 709
 	case 17:
710 710
 		// get the settings editor
711
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
712
-		include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme));
713
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
711
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
712
+		include_once(includeFileProcessor("actions/mutate_settings.dynamic.php", $manager_theme));
713
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
714 714
 	break;
715 715
 	case 118:
716 716
 		// call settings ajax include
717 717
 		ob_clean();
718
-		include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme));
718
+		include_once(includeFileProcessor("includes/mutate_settings.ajax.php", $manager_theme));
719 719
 	break;
720 720
 /********************************************************************/
721 721
 /* save settings                                                    */
722 722
 /********************************************************************/
723 723
 	case 30:
724 724
 		// get the save settings processor
725
-		include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme));
725
+		include_once(includeFileProcessor("processors/save_settings.processor.php", $manager_theme));
726 726
 	break;
727 727
 /********************************************************************/
728 728
 /* system information                                               */
729 729
 /********************************************************************/
730 730
 	case 53:
731 731
 		// get the settings editor
732
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
733
-		include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme));
734
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
732
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
733
+		include_once(includeFileProcessor("actions/sysinfo.static.php", $manager_theme));
734
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
735 735
 	break;
736 736
 /********************************************************************/
737 737
 /* optimise table                                               */
738 738
 /********************************************************************/
739 739
 	case 54:
740 740
 		// get the table optimizer/truncate processor
741
-		include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme));
741
+		include_once(includeFileProcessor("processors/optimize_table.processor.php", $manager_theme));
742 742
 	break;
743 743
 /********************************************************************/
744 744
 /* view logging                                                     */
745 745
 /********************************************************************/
746 746
 	case 13:
747 747
 		// view logging
748
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
749
-		include_once(includeFileProcessor("actions/logging.static.php",$manager_theme));
750
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
748
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
749
+		include_once(includeFileProcessor("actions/logging.static.php", $manager_theme));
750
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
751 751
 	break;
752 752
 /********************************************************************/
753 753
 /* empty logs                                                       */
754 754
 /********************************************************************/
755 755
 	case 55:
756 756
 		// get the settings editor
757
-		include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme));
757
+		include_once(includeFileProcessor("processors/empty_table.processor.php", $manager_theme));
758 758
 	break;
759 759
 /********************************************************************/
760 760
 /* calls test page                                                      */
761 761
 /********************************************************************/
762 762
 	case 999:
763 763
 		// get the test page
764
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
765
-		include_once(includeFileProcessor("test_page.php",$manager_theme));
766
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
764
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
765
+		include_once(includeFileProcessor("test_page.php", $manager_theme));
766
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
767 767
 	break;
768 768
 /********************************************************************/
769 769
 /* Empty recycle bin                                                */
770 770
 /********************************************************************/
771 771
 	case 64:
772 772
 		// get the Recycle bin emptier
773
-		include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme));
773
+		include_once(includeFileProcessor("processors/remove_content.processor.php", $manager_theme));
774 774
 	break;
775 775
 /********************************************************************/
776 776
 /* Messages                                                     */
777 777
 /********************************************************************/
778 778
 	case 10:
779 779
 		// get the messages page
780
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
781
-		include_once(includeFileProcessor("actions/messages.static.php",$manager_theme));
782
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
780
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
781
+		include_once(includeFileProcessor("actions/messages.static.php", $manager_theme));
782
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
783 783
 	break;
784 784
 /********************************************************************/
785 785
 /* Delete a message                                                 */
786 786
 /********************************************************************/
787 787
 	case 65:
788 788
 		// get the message deleter
789
-		include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme));
789
+		include_once(includeFileProcessor("processors/delete_message.processor.php", $manager_theme));
790 790
 	break;
791 791
 /********************************************************************/
792 792
 /* Send a message                                                   */
793 793
 /********************************************************************/
794 794
 	case 66:
795 795
 		// get the message deleter
796
-		include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme));
796
+		include_once(includeFileProcessor("processors/send_message.processor.php", $manager_theme));
797 797
 	break;
798 798
 /********************************************************************/
799 799
 /* Remove locks                                                 */
800 800
 /********************************************************************/
801 801
 	case 67:
802 802
 		// get the lock remover
803
-		include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme));
803
+		include_once(includeFileProcessor("processors/remove_locks.processor.php", $manager_theme));
804 804
 	break;
805 805
 /********************************************************************/
806 806
 /* Site schedule                                                    */
807 807
 /********************************************************************/
808 808
 	case 70:
809 809
 		// get the schedule page
810
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
811
-		include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme));
812
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
810
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
811
+		include_once(includeFileProcessor("actions/site_schedule.static.php", $manager_theme));
812
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
813 813
 	break;
814 814
 /********************************************************************/
815 815
 /* Search                                                           */
816 816
 /********************************************************************/
817 817
 	case 71:
818 818
 		// get the search page
819
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
820
-		include_once(includeFileProcessor("actions/search.static.php",$manager_theme));
821
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
819
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
820
+		include_once(includeFileProcessor("actions/search.static.php", $manager_theme));
821
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
822 822
 	break;
823 823
 /********************************************************************/
824 824
 /* About                                                            */
825 825
 /********************************************************************/
826 826
 	case 59:
827 827
 		// get the about page
828
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
829
-		include_once(includeFileProcessor("actions/about.static.php",$manager_theme));
830
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
828
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
829
+		include_once(includeFileProcessor("actions/about.static.php", $manager_theme));
830
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
831 831
 	break;
832 832
 /********************************************************************/
833 833
 /* Add weblink                                                          */
834 834
 /********************************************************************/
835 835
 	case 72:
836 836
 		// get the weblink page
837
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
838
-		include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme));
839
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
837
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
838
+		include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme));
839
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
840 840
 	break;
841 841
 /********************************************************************/
842 842
 /* User management                                                  */
843 843
 /********************************************************************/
844 844
 	case 75:
845
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
846
-		include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme));
847
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
845
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
846
+		include_once(includeFileProcessor("actions/user_management.static.php", $manager_theme));
847
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
848 848
 	break;
849 849
 	case 99:
850
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
851
-		include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme));
852
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
850
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
851
+		include_once(includeFileProcessor("actions/web_user_management.static.php", $manager_theme));
852
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
853 853
 	break;
854 854
 	case 86:
855
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
856
-		include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme));
857
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
855
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
856
+		include_once(includeFileProcessor("actions/role_management.static.php", $manager_theme));
857
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
858 858
 	break;
859 859
 /********************************************************************/
860 860
 /* template/ snippet management                                                 */
861 861
 /********************************************************************/
862 862
 	case 76:
863
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
864
-		include_once(includeFileProcessor("actions/resources.static.php",$manager_theme));
865
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
863
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
864
+		include_once(includeFileProcessor("actions/resources.static.php", $manager_theme));
865
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
866 866
 	break;
867 867
 /********************************************************************/
868 868
 /* Export to file                                                   */
869 869
 /********************************************************************/
870 870
 	case 83:
871
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
872
-		include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme));
873
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
871
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
872
+		include_once(includeFileProcessor("actions/export_site.static.php", $manager_theme));
873
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
874 874
 	break;
875 875
 /********************************************************************/
876 876
 /* Resource Selector                                                    */
877 877
 /********************************************************************/
878 878
 	case 84:
879
-		include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme));
879
+		include_once(includeFileProcessor("actions/resource_selector.static.php", $manager_theme));
880 880
 	break;
881 881
 /********************************************************************/
882 882
 /* Backup Manager                                                   */
883 883
 /********************************************************************/
884 884
 	case 93:
885 885
 		# header and footer will be handled interally
886
-		include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme));
886
+		include_once(includeFileProcessor("actions/bkmanager.static.php", $manager_theme));
887 887
 	break;
888 888
 /********************************************************************/
889 889
 /* Duplicate Document                                                   */
890 890
 /********************************************************************/
891 891
 	case 94:
892 892
 		// get the duplicate processor
893
-		include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme));
893
+		include_once(includeFileProcessor("processors/duplicate_content.processor.php", $manager_theme));
894 894
 	break;
895 895
 /********************************************************************/
896 896
 /* Import Document from file                                        */
897 897
 /********************************************************************/
898 898
 	case 95:
899
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
900
-		include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme));
901
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
899
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
900
+		include_once(includeFileProcessor("actions/import_site.static.php", $manager_theme));
901
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
902 902
 	break;
903 903
 /********************************************************************/
904 904
 /* Help                                                             */
905 905
 /********************************************************************/
906 906
 	case 9:
907 907
 		// get the help page
908
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
909
-		include_once(includeFileProcessor("actions/help.static.php",$manager_theme));
910
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
908
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
909
+		include_once(includeFileProcessor("actions/help.static.php", $manager_theme));
910
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
911 911
 	break;
912 912
 /********************************************************************/
913 913
 /* Template Variables - Based on Apodigm's Docvars                  */
914 914
 /********************************************************************/
915 915
 	case 300:
916 916
 		// get the new document variable action
917
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
918
-		include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme));
919
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
917
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
918
+		include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme));
919
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
920 920
 	break;
921 921
 	case 301:
922 922
 		// get the edit document variable action
923
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
924
-		include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme));
925
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
923
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
924
+		include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme));
925
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
926 926
 	break;
927 927
 	case 302:
928 928
 		// get the save processor
929
-		include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme));
929
+		include_once(includeFileProcessor("processors/save_tmplvars.processor.php", $manager_theme));
930 930
 	break;
931 931
 	case 303:
932 932
 		// get the delete processor
933
-		include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme));
933
+		include_once(includeFileProcessor("processors/delete_tmplvars.processor.php", $manager_theme));
934 934
 	break;
935 935
 	case 304:
936 936
 		// get the duplicate processor
937
-		include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme));
937
+		include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php", $manager_theme));
938 938
 	break;
939 939
 	case 305:
940 940
 		// get the tv-rank action
941
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
942
-		include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme));
943
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
941
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
942
+		include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php", $manager_theme));
943
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
944 944
 	break;
945 945
 /********************************************************************/
946 946
 /* Event viewer: show event message log                             */
947 947
 /********************************************************************/
948 948
 	case 114:
949 949
 		// get event logs
950
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
951
-		include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme));
952
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
950
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
951
+		include_once(includeFileProcessor("actions/eventlog.dynamic.php", $manager_theme));
952
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
953 953
 	break;
954 954
 	case 115:
955 955
 		// get event log details viewer
956
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
957
-		include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme));
958
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
956
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
957
+		include_once(includeFileProcessor("actions/eventlog_details.dynamic.php", $manager_theme));
958
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
959 959
 	break;
960 960
 	case 116:
961 961
 		// get the event log delete processor
962
-		include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme));
962
+		include_once(includeFileProcessor("processors/delete_eventlog.processor.php", $manager_theme));
963 963
 	break;
964 964
 
965 965
 	case 501:
966 966
 		//delete category
967
-		include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme));
967
+		include_once(includeFileProcessor("processors/delete_category.processor.php", $manager_theme));
968 968
 	break;
969 969
 /********************************************************************/
970 970
 /* default action: show not implemented message                     */
971 971
 /********************************************************************/
972 972
 	default :
973 973
 		// say that what was requested doesn't do anything yet
974
-		include_once(includeFileProcessor("includes/header.inc.php",$manager_theme));
974
+		include_once(includeFileProcessor("includes/header.inc.php", $manager_theme));
975 975
 		echo "
976 976
 			<div class='sectionHeader'>".$_lang['functionnotimpl']."</div>
977 977
 			<div class='sectionBody'>
978 978
 				<p>".$_lang['functionnotimpl_message']."</p>
979 979
 			</div>
980 980
 		";
981
-		include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme));
981
+		include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme));
982 982
 }
983 983
 
984 984
 /********************************************************************/
985 985
 // log action, unless it's a frame request
986
-if($action!=1 && $action!=7 && $action!=2) {
986
+if ($action != 1 && $action != 7 && $action != 2) {
987 987
 	include_once "log.class.inc.php";
988 988
 	$log = new logHandler;
989 989
 	$log->initAndWriteLog();
Please login to merge, or discard this patch.