Completed
Pull Request — develop (#522)
by Agel_Nash
07:16
created
manager/includes/extenders/deprecated.functions.inc.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -1,43 +1,43 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $this->old = new OldFunctions();
3
-class OldFunctions {
3
+class OldFunctions{
4 4
 
5
-    function dbConnect()                 {global $modx;       $modx->db->connect();$modx->rs = $modx->db->conn;}
6
-    function dbQuery($sql)               {global $modx;return $modx->db->query($sql);}
7
-    function recordCount($rs)            {global $modx;return $modx->db->getRecordCount($rs);}
8
-    function fetchRow($rs,$mode='assoc') {global $modx;return $modx->db->getRow($rs, $mode);}
9
-    function affectedRows($rs)           {global $modx;return $modx->db->getAffectedRows($rs);}
10
-    function insertId($rs)               {global $modx;return $modx->db->getInsertId($rs);}
11
-    function dbClose()                   {global $modx;       $modx->db->disconnect();}
5
+    function dbConnect(){global $modx; $modx->db->connect(); $modx->rs = $modx->db->conn; }
6
+    function dbQuery($sql){global $modx; return $modx->db->query($sql); }
7
+    function recordCount($rs){global $modx; return $modx->db->getRecordCount($rs); }
8
+    function fetchRow($rs, $mode = 'assoc'){global $modx; return $modx->db->getRow($rs, $mode); }
9
+    function affectedRows($rs){global $modx; return $modx->db->getAffectedRows($rs); }
10
+    function insertId($rs){global $modx; return $modx->db->getInsertId($rs); }
11
+    function dbClose(){global $modx; $modx->db->disconnect(); }
12 12
 
13
-    function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) {
13
+    function makeList($array, $ulroot = 'root', $ulprefix = 'sub_', $type = '', $ordered = false, $tablevel = 0){
14 14
         // first find out whether the value passed is an array
15 15
         if (!is_array($array)) {
16 16
             return "<ul><li>Bad list</li></ul>";
17 17
         }
18 18
         if (!empty ($type)) {
19
-            $typestr= " style='list-style-type: $type'";
19
+            $typestr = " style='list-style-type: $type'";
20 20
         } else {
21
-            $typestr= "";
21
+            $typestr = "";
22 22
         }
23
-        $tabs= "";
24
-        for ($i= 0; $i < $tablevel; $i++) {
23
+        $tabs = "";
24
+        for ($i = 0; $i < $tablevel; $i++) {
25 25
             $tabs .= "\t";
26 26
         }
27
-        $listhtml= $ordered == true ? $tabs . "<ol class='$ulroot'$typestr>\n" : $tabs . "<ul class='$ulroot'$typestr>\n";
27
+        $listhtml = $ordered == true ? $tabs."<ol class='$ulroot'$typestr>\n" : $tabs."<ul class='$ulroot'$typestr>\n";
28 28
         foreach ($array as $key => $value) {
29 29
             if (is_array($value)) {
30
-                $listhtml .= $tabs . "\t<li>" . $key . "\n" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix, $type, $ordered, $tablevel +2) . $tabs . "\t</li>\n";
30
+                $listhtml .= $tabs."\t<li>".$key."\n".$this->makeList($value, $ulprefix.$ulroot, $ulprefix, $type, $ordered, $tablevel + 2).$tabs."\t</li>\n";
31 31
             } else {
32
-                $listhtml .= $tabs . "\t<li>" . $value . "</li>\n";
32
+                $listhtml .= $tabs."\t<li>".$value."</li>\n";
33 33
             }
34 34
         }
35
-        $listhtml .= $ordered == true ? $tabs . "</ol>\n" : $tabs . "</ul>\n";
35
+        $listhtml .= $ordered == true ? $tabs."</ol>\n" : $tabs."</ul>\n";
36 36
         return $listhtml;
37 37
     }
38 38
 
39 39
 
40
-    function getUserData() {
40
+    function getUserData(){
41 41
         $client['ip'] = $_SERVER['REMOTE_ADDR'];
42 42
         $client['ua'] = $_SERVER['HTTP_USER_AGENT'];
43 43
     	return $client;
@@ -45,80 +45,80 @@  discard block
 block discarded – undo
45 45
 
46 46
     # Returns true, install or interact when inside manager
47 47
     // deprecated
48
-    function insideManager() {
49
-        $m= false;
50
-        if( defined('IN_MANAGER_MODE') && IN_MANAGER_MODE === true) {
51
-            $m= true;
48
+    function insideManager(){
49
+        $m = false;
50
+        if (defined('IN_MANAGER_MODE') && IN_MANAGER_MODE === true) {
51
+            $m = true;
52 52
             if (defined('SNIPPET_INTERACTIVE_MODE') && SNIPPET_INTERACTIVE_MODE == 'true')
53
-                $m= "interact";
53
+                $m = "interact";
54 54
             else
55 55
                 if (defined('SNIPPET_INSTALL_MODE') && SNIPPET_INSTALL_MODE == 'true')
56
-                    $m= "install";
56
+                    $m = "install";
57 57
         }
58 58
         return $m;
59 59
     }
60 60
 
61 61
     // deprecated
62
-    function putChunk($chunkName) { // alias name >.<
62
+    function putChunk($chunkName){ // alias name >.<
63 63
     	global $modx;
64 64
         return $modx->getChunk($chunkName);
65 65
     }
66 66
 
67
-    function getDocGroups() {
67
+    function getDocGroups(){
68 68
     	global $modx;
69 69
         return $modx->getUserDocGroups();
70 70
     } // deprecated
71 71
 
72
-    function changePassword($o, $n) {
72
+    function changePassword($o, $n){
73 73
         return changeWebUserPassword($o, $n);
74 74
     } // deprecated
75 75
 
76
-    function userLoggedIn() {
76
+    function userLoggedIn(){
77 77
     	global $modx;
78
-        $userdetails= array ();
78
+        $userdetails = array();
79 79
         if ($modx->isFrontend() && isset ($_SESSION['webValidated'])) {
80 80
             // web user
81
-            $userdetails['loggedIn']= true;
82
-            $userdetails['id']= $_SESSION['webInternalKey'];
83
-            $userdetails['username']= $_SESSION['webShortname'];
84
-            $userdetails['usertype']= 'web'; // added by Raymond
81
+            $userdetails['loggedIn'] = true;
82
+            $userdetails['id'] = $_SESSION['webInternalKey'];
83
+            $userdetails['username'] = $_SESSION['webShortname'];
84
+            $userdetails['usertype'] = 'web'; // added by Raymond
85 85
             return $userdetails;
86 86
         } else
87 87
             if ($modx->isBackend() && isset ($_SESSION['mgrValidated'])) {
88 88
                 // manager user
89
-                $userdetails['loggedIn']= true;
90
-                $userdetails['id']= $_SESSION['mgrInternalKey'];
91
-                $userdetails['username']= $_SESSION['mgrShortname'];
92
-                $userdetails['usertype']= 'manager'; // added by Raymond
89
+                $userdetails['loggedIn'] = true;
90
+                $userdetails['id'] = $_SESSION['mgrInternalKey'];
91
+                $userdetails['username'] = $_SESSION['mgrShortname'];
92
+                $userdetails['usertype'] = 'manager'; // added by Raymond
93 93
                 return $userdetails;
94 94
             } else {
95 95
                 return false;
96 96
             }
97 97
     }
98 98
 
99
-    function getFormVars($method= "", $prefix= "", $trim= "", $REQUEST_METHOD) {
99
+    function getFormVars($method = "", $prefix = "", $trim = "", $REQUEST_METHOD){
100 100
         //  function to retrieve form results into an associative array
101 101
     	global $modx;
102
-        $results= array ();
103
-        $method= strtoupper($method);
102
+        $results = array();
103
+        $method = strtoupper($method);
104 104
         if ($method == "")
105
-            $method= $REQUEST_METHOD;
105
+            $method = $REQUEST_METHOD;
106 106
         if ($method == "POST")
107
-            $method= & $_POST;
108
-        elseif ($method == "GET") $method= & $_GET;
107
+            $method = & $_POST;
108
+        elseif ($method == "GET") $method = & $_GET;
109 109
         else
110 110
             return false;
111 111
         reset($method);
112 112
         foreach ($method as $key => $value) {
113 113
             if (($prefix != "") && (substr($key, 0, strlen($prefix)) == $prefix)) {
114 114
                 if ($trim) {
115
-                    $pieces= explode($prefix, $key, 2);
116
-                    $key= $pieces[1];
117
-                    $results[$key]= $value;
115
+                    $pieces = explode($prefix, $key, 2);
116
+                    $key = $pieces[1];
117
+                    $results[$key] = $value;
118 118
                 } else
119
-                    $results[$key]= $value;
119
+                    $results[$key] = $value;
120 120
             }
121
-            elseif ($prefix == "") $results[$key]= $value;
121
+            elseif ($prefix == "") $results[$key] = $value;
122 122
         }
123 123
         return $results;
124 124
     }
@@ -129,16 +129,16 @@  discard block
 block discarded – undo
129 129
      * @param string $msg Message to show
130 130
      * @param string $url URL to redirect to
131 131
      */
132
-    function webAlert($msg, $url= "") {
132
+    function webAlert($msg, $url = ""){
133 133
     	global $modx;
134
-        $msg= addslashes($modx->db->escape($msg));
134
+        $msg = addslashes($modx->db->escape($msg));
135 135
         if (substr(strtolower($url), 0, 11) == "javascript:") {
136
-            $act= "__WebAlert();";
137
-            $fnc= "function __WebAlert(){" . substr($url, 11) . "};";
136
+            $act = "__WebAlert();";
137
+            $fnc = "function __WebAlert(){".substr($url, 11)."};";
138 138
         } else {
139
-            $act= ($url ? "window.location.href='" . addslashes($url) . "';" : "");
139
+            $act = ($url ? "window.location.href='".addslashes($url)."';" : "");
140 140
         }
141
-        $html= "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>";
141
+        $html = "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>";
142 142
         if ($modx->isFrontend())
143 143
             $modx->regClientScript($html);
144 144
         else {
Please login to merge, or discard this patch.
manager/includes/extenders/message.quit.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * Message Quit Template
4 4
  *
5 5
  */
6
-if(( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) && IN_PARSER_MODE!="true") {
6
+if ((!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) && IN_PARSER_MODE != "true") {
7 7
     die("<b>INCLUDE ACCESS ERROR</b><br /><br />Direct access to this file prohibited.");
8 8
 }
9 9
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 </script>
21 21
 </head><body>
22 22
 ";
23
-if($is_error) {
23
+if ($is_error) {
24 24
 	$parsedMessageString .= "<h3 style='color:red;background:#e0e0e0;padding:2px;'>&nbsp;MODX Parse Error </h3>
25 25
 	<table border='0' cellpadding='1' cellspacing='0'>
26 26
 	<tr><td colspan='3'>MODX encountered the following error while attempting to parse the requested resource:</td></tr>
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 	<tr><td colspan='3'><b style='color:#003399;'>&laquo; $msg &raquo;</b></td></tr>";
33 33
 }
34 34
 
35
-if(!empty($query)) {
35
+if (!empty($query)) {
36 36
 	$parsedMessageString .= "<tr><td colspan='3'><hr size='1' width='98%' style='color:#e0e0e0'/><b style='color:#999;font-size: 9px;border-left:1px solid #c0c0c0; margin-left:10px;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQL:&nbsp;<span id='sqlHolder'>$query</span></b><hr size='1' width='98%' style='color:#e0e0e0'/>
37 37
 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:copyToClip();' style='color:#821517;font-size: 9px; text-decoration: none'>[Copy SQL to ClipBoard]</a><textarea id='holdtext' style='display:none;'></textarea></td></tr>";
38 38
 }
39 39
 
40
-if($text!='') {
40
+if ($text != '') {
41 41
 
42
-	$errortype = array (
42
+	$errortype = array(
43 43
 		E_ERROR          => "Error",
44 44
 		E_WARNING        => "Warning",
45 45
 		E_PARSE          => "Parsing Error",
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	$parsedMessageString .= "<tr><td>&nbsp;&nbsp;Line: </td>";
71 71
 	$parsedMessageString .= "<td colspan='2'>$line</td><td>&nbsp;</td>";
72 72
 	$parsedMessageString .= "</tr>";
73
-	if($source!='') {
73
+	if ($source != '') {
74 74
 		$parsedMessageString .= "<tr><td valign='top'>&nbsp;&nbsp;Line $line source: </td>";
75 75
 		$parsedMessageString .= "<td colspan='2'>$source</td><td>&nbsp;</td>";
76 76
 		$parsedMessageString .= "</tr>";
Please login to merge, or discard this patch.
manager/includes/extenders/modxmailer.class.inc.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 use PHPMailer\PHPMailer\PHPMailer;
12 12
 use PHPMailer\PHPMailer\Exception;
13 13
 
14
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/Exception.php';
15
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/PHPMailer.php';
16
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/SMTP.php';
14
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/Exception.php';
15
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/PHPMailer.php';
16
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/SMTP.php';
17 17
 
18 18
 /**
19 19
  * Class MODxMailer
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function init(\DocumentParser $modx)
32 32
     {
33 33
         $this->modx = $modx;
34
-        $this->PluginDir = MODX_MANAGER_PATH . 'includes/controls/phpmailer/';
34
+        $this->PluginDir = MODX_MANAGER_PATH.'includes/controls/phpmailer/';
35 35
 
36 36
         switch ($modx->config['email_method']) {
37 37
             case 'smtp':
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             mb_language($this->mb_language);
96 96
             mb_internal_encoding($modx->config['modx_charset']);
97 97
         }
98
-        $exconf = MODX_MANAGER_PATH . 'includes/controls/phpmailer/config.inc.php';
98
+        $exconf = MODX_MANAGER_PATH.'includes/controls/phpmailer/config.inc.php';
99 99
         if (is_file($exconf)) {
100 100
             include($exconf);
101 101
         }
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
         }
164 164
 
165 165
         if ($this->modx->debug) {
166
-            $debug_info = 'CharSet = ' . $this->CharSet . "\n";
167
-            $debug_info .= 'Encoding = ' . $this->Encoding . "\n";
168
-            $debug_info .= 'mb_language = ' . $this->mb_language . "\n";
169
-            $debug_info .= 'encode_header_method = ' . $this->encode_header_method . "\n";
166
+            $debug_info = 'CharSet = '.$this->CharSet."\n";
167
+            $debug_info .= 'Encoding = '.$this->Encoding."\n";
168
+            $debug_info .= 'mb_language = '.$this->mb_language."\n";
169
+            $debug_info .= 'encode_header_method = '.$this->encode_header_method."\n";
170 170
             $debug_info .= "send_mode = {$mode}\n";
171
-            $debug_info .= 'Subject = ' . $this->Subject . "\n";
171
+            $debug_info .= 'Subject = '.$this->Subject."\n";
172 172
             $log = "<pre>{$debug_info}\n{$header}\n{$org_body}</pre>";
173 173
             $this->modx->logEvent(1, 1, $log, 'MODxMailer debug information');
174 174
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
             ini_set('sendmail_from', $old_from);
233 233
         }
234 234
         if (!$rt) {
235
-            $msg = $this->Lang('instantiate') . "<br />\n";
235
+            $msg = $this->Lang('instantiate')."<br />\n";
236 236
             $msg .= "{$this->Subject}<br />\n";
237 237
             $msg .= "{$this->FromName}&lt;{$this->From}&gt;<br />\n";
238 238
             $msg .= mb_convert_encoding($body, $this->modx->config['modx_charset'], $this->CharSet);
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      */
252 252
     public function SetError($msg)
253 253
     {
254
-        $msg .= '<pre>' . print_r(get_object_vars($this), true) . '</pre>';
254
+        $msg .= '<pre>'.print_r(get_object_vars($this), true).'</pre>';
255 255
         $this->modx->config['send_errormail'] = '0';
256 256
         $this->modx->logEvent(0, 3, $msg, 'phpmailer');
257 257
 
@@ -280,14 +280,14 @@  discard block
 block discarded – undo
280 280
     /**
281 281
      * @return string
282 282
      */
283
-    public function getMIMEHeader() {
283
+    public function getMIMEHeader(){
284 284
         return $this->MIMEHeader;
285 285
     }
286 286
 
287 287
     /**
288 288
      * @return string
289 289
      */
290
-    public function getMIMEBody() {
290
+    public function getMIMEBody(){
291 291
         return $this->MIMEBody;
292 292
     }
293 293
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      *
297 297
      * @return $this
298 298
      */
299
-    public function setMIMEHeader($header = '') {
299
+    public function setMIMEHeader($header = ''){
300 300
         $this->MIMEHeader = $header;
301 301
 
302 302
         return $this;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      *
308 308
      * @return $this
309 309
      */
310
-    public function setMIMEBody($body = '') {
310
+    public function setMIMEBody($body = ''){
311 311
         $this->MIMEBody = $body;
312 312
 
313 313
         return $this;
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      *
319 319
      * @return $this
320 320
      */
321
-    public function setMailHeader($header = '') {
321
+    public function setMailHeader($header = ''){
322 322
         $this->mailHeader = $header;
323 323
 
324 324
         return $this;
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     /**
328 328
      * @return string
329 329
      */
330
-    public function getMessageID() {
331
-        return trim($this->lastMessageID,'<>');
330
+    public function getMessageID(){
331
+        return trim($this->lastMessageID, '<>');
332 332
     }
333 333
 }
Please login to merge, or discard this patch.
manager/includes/mutate_settings.ajax.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
3 3
  * mutate_settings.ajax.php
4 4
  *
5 5
  */
6
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
6
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
7 7
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
8 8
 }
9 9
 
10
-require_once(dirname(__FILE__) . '/protect.inc.php');
10
+require_once(dirname(__FILE__).'/protect.inc.php');
11 11
 
12 12
 $action = preg_replace('/[^A-Za-z0-9_\-\.\/]/', '', $_POST['action']);
13 13
 $lang = preg_replace('/[^A-Za-z0-9_\s\+\-\.\/]/', '', $_POST['lang']);
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 $str = '';
23 23
 $emptyCache = false;
24 24
 
25
-switch(true){
26
-    case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/',$lang) && file_exists(dirname(__FILE__) . '/lang/'.$lang.'.inc.php')):{
27
-        include(dirname(__FILE__) . '/lang/'.$lang.'.inc.php');
28
-        $str = isset($key,$_lang,$_lang[$key]) ? $_lang[$key] : "" ;
25
+switch (true) {
26
+    case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/', $lang) && file_exists(dirname(__FILE__).'/lang/'.$lang.'.inc.php')):{
27
+        include(dirname(__FILE__).'/lang/'.$lang.'.inc.php');
28
+        $str = isset($key, $_lang, $_lang[$key]) ? $_lang[$key] : "";
29 29
         break;
30 30
     }
31 31
     case ($action == 'setsetting' && !empty($key) && !empty($value)):{
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     }
53 53
 }
54 54
 
55
-if($emptyCache) {
55
+if ($emptyCache) {
56 56
 	$modx->clearCache('full');
57 57
 }
58 58
 
Please login to merge, or discard this patch.
manager/includes/config_check.inc.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  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 6
 // PROCESSOR FIRST
7
-if($_SESSION['mgrRole'] == 1) {
8
-	if($_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) {
7
+if ($_SESSION['mgrRole'] == 1) {
8
+	if ($_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) {
9 9
 		$current = $modx->manager->getSystemChecksum($modx->config['check_files_onlogin']);
10
-		if(!empty($current)) {
10
+		if (!empty($current)) {
11 11
 			$modx->manager->setSystemChecksum($current);
12 12
 			$modx->clearCache('full');
13 13
 			$modx->config['sys_files_checksum'] = $current;
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 $warningspresent = 0;
20 20
 
21 21
 $sysfiles_check = $modx->manager->checkSystemChecksum();
22
-if ($sysfiles_check!=='0'){
22
+if ($sysfiles_check !== '0') {
23 23
       $warningspresent = 1;
24 24
       $warnings[] = array($_lang['configcheck_sysfiles_mod']);
25 25
 }
26 26
 
27
-if (is_writable("includes/config.inc.php")){
27
+if (is_writable("includes/config.inc.php")) {
28 28
     // Warn if world writable
29
-    if(@fileperms('includes/config.inc.php') & 0x0002) {
29
+    if (@fileperms('includes/config.inc.php') & 0x0002) {
30 30
       $warningspresent = 1;
31 31
       $warnings[] = array($_lang['configcheck_configinc']);
32 32
     }
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
     $warnings[] = array($_lang['configcheck_php_gdzip']);
43 43
 }
44 44
 
45
-if(!isset($modx->config['_hide_configcheck_validate_referer']) || $modx->config['_hide_configcheck_validate_referer'] !== '1') {
46
-    if(isset($_SESSION['mgrPermissions']['settings']) && $_SESSION['mgrPermissions']['settings'] == '1') {
45
+if (!isset($modx->config['_hide_configcheck_validate_referer']) || $modx->config['_hide_configcheck_validate_referer'] !== '1') {
46
+    if (isset($_SESSION['mgrPermissions']['settings']) && $_SESSION['mgrPermissions']['settings'] == '1') {
47 47
         if ($modx->db->getValue($modx->db->select('COUNT(setting_value)', $modx->getFullTableName('system_settings'), "setting_name='validate_referer' AND setting_value='0'"))) {
48 48
             $warningspresent = 1;
49 49
             $warnings[] = array($_lang['configcheck_validate_referer']);
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 }
53 53
 
54 54
 // check for Template Switcher plugin
55
-if(!isset($modx->config['_hide_configcheck_templateswitcher_present']) || $modx->config['_hide_configcheck_templateswitcher_present'] !== '1') {
56
-    if(isset($_SESSION['mgrPermissions']['edit_plugin']) && $_SESSION['mgrPermissions']['edit_plugin'] == '1') {
55
+if (!isset($modx->config['_hide_configcheck_templateswitcher_present']) || $modx->config['_hide_configcheck_templateswitcher_present'] !== '1') {
56
+    if (isset($_SESSION['mgrPermissions']['edit_plugin']) && $_SESSION['mgrPermissions']['edit_plugin'] == '1') {
57 57
         $rs = $modx->db->select('name, disabled', $modx->getFullTableName('site_plugins'), "name IN ('TemplateSwitcher', 'Template Switcher', 'templateswitcher', 'template_switcher', 'template switcher') OR plugincode LIKE '%TemplateSwitcher%'");
58 58
         $row = $modx->db->getRow($rs);
59
-        if($row && $row['disabled'] == 0) {
59
+        if ($row && $row['disabled'] == 0) {
60 60
             $warningspresent = 1;
61 61
             $warnings[] = array($_lang['configcheck_templateswitcher_present']);
62 62
             $tplName = $row['name'];
@@ -117,36 +117,36 @@  discard block
 block discarded – undo
117 117
 }
118 118
 
119 119
 if (!function_exists('checkSiteCache')) {
120
-    function checkSiteCache() {
120
+    function checkSiteCache(){
121 121
         global $modx;
122
-        $checked= true;
123
-        if (file_exists($modx->config['base_path'] . 'assets/cache/siteCache.idx.php')) {
124
-            $checked= @include_once ($modx->config['base_path'] . 'assets/cache/siteCache.idx.php');
122
+        $checked = true;
123
+        if (file_exists($modx->config['base_path'].'assets/cache/siteCache.idx.php')) {
124
+            $checked = @include_once ($modx->config['base_path'].'assets/cache/siteCache.idx.php');
125 125
         }
126 126
         return $checked;
127 127
     }
128 128
 }
129 129
 
130
-if (!is_writable(MODX_BASE_PATH . "assets/cache/")) {
130
+if (!is_writable(MODX_BASE_PATH."assets/cache/")) {
131 131
     $warningspresent = 1;
132 132
     $warnings[] = array($_lang['configcheck_cache']);
133 133
 }
134 134
 
135 135
 if (!checkSiteCache()) {
136 136
     $warningspresent = 1;
137
-    $warnings[]= array($lang['configcheck_sitecache_integrity']);
137
+    $warnings[] = array($lang['configcheck_sitecache_integrity']);
138 138
 }
139 139
 
140
-if (!is_writable(MODX_BASE_PATH . "assets/images/")) {
140
+if (!is_writable(MODX_BASE_PATH."assets/images/")) {
141 141
     $warningspresent = 1;
142 142
     $warnings[] = array($_lang['configcheck_images']);
143 143
 }
144 144
 
145
-if(strpos($modx->config['rb_base_dir'],MODX_BASE_PATH)!==0) {
145
+if (strpos($modx->config['rb_base_dir'], MODX_BASE_PATH) !== 0) {
146 146
     $warningspresent = 1;
147 147
     $warnings[] = array($_lang['configcheck_rb_base_dir']);
148 148
 }
149
-if(strpos($modx->config['filemanager_path'],MODX_BASE_PATH)!==0) {
149
+if (strpos($modx->config['filemanager_path'], MODX_BASE_PATH) !== 0) {
150 150
     $warningspresent = 1;
151 151
     $warnings[] = array($_lang['configcheck_filemanager_path']);
152 152
 }
@@ -154,36 +154,36 @@  discard block
 block discarded – undo
154 154
 // clear file info cache
155 155
 clearstatcache();
156 156
 
157
-if ($warningspresent==1) {
157
+if ($warningspresent == 1) {
158 158
 
159
-if(!isset($modx->config['send_errormail'])) $modx->config['send_errormail']='3';
159
+if (!isset($modx->config['send_errormail'])) $modx->config['send_errormail'] = '3';
160 160
 $config_check_results = "<h3>".$_lang['configcheck_notok']."</h3>";
161 161
 
162
-for ($i=0;$i<count($warnings);$i++) {
162
+for ($i = 0; $i < count($warnings); $i++) {
163 163
     switch ($warnings[$i][0]) {
164 164
         case $_lang['configcheck_configinc'];
165 165
             $warnings[$i][1] = $_lang['configcheck_configinc_msg'];
166
-            if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_configinc']);
166
+            if (!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0, 3, $warnings[$i][1], $_lang['configcheck_configinc']);
167 167
             break;
168 168
         case $_lang['configcheck_installer'] :
169 169
             $warnings[$i][1] = $_lang['configcheck_installer_msg'];
170
-            if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_installer']);
170
+            if (!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0, 3, $warnings[$i][1], $_lang['configcheck_installer']);
171 171
             break;
172 172
         case $_lang['configcheck_cache'] :
173 173
             $warnings[$i][1] = $_lang['configcheck_cache_msg'];
174
-            if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_cache']);
174
+            if (!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0, 2, $warnings[$i][1], $_lang['configcheck_cache']);
175 175
             break;
176 176
         case $_lang['configcheck_images'] :
177 177
             $warnings[$i][1] = $_lang['configcheck_images_msg'];
178
-            if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_images']);
178
+            if (!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0, 2, $warnings[$i][1], $_lang['configcheck_images']);
179 179
             break;
180 180
         case $_lang['configcheck_sysfiles_mod']:
181 181
             $warnings[$i][1] = $_lang["configcheck_sysfiles_mod_msg"];
182
-			$warnings[$i][2] = '<ul><li>'. join('</li><li>', $sysfiles_check) .'</li></ul>';
183
-			if($modx->hasPermission('settings')) {
184
-				$warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>';
182
+			$warnings[$i][2] = '<ul><li>'.join('</li><li>', $sysfiles_check).'</li></ul>';
183
+			if ($modx->hasPermission('settings')) {
184
+				$warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\''.$_lang["reset_sysfiles_checksum_alert"].'\')">'.$_lang["reset_sysfiles_checksum_button"].'</a></li></ul>';
185 185
 			}
186
-            if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1]." ".join(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']);
186
+            if (!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0, 3, $warnings[$i][1]." ".join(', ', $sysfiles_check), $_lang['configcheck_sysfiles_mod']);
187 187
             break;
188 188
         case $_lang['configcheck_lang_difference'] :
189 189
             $warnings[$i][1] = $_lang['configcheck_lang_difference_msg'];
@@ -205,18 +205,18 @@  discard block
 block discarded – undo
205 205
             break;
206 206
         case $_lang['configcheck_validate_referer'] :
207 207
             $msg = $_lang['configcheck_validate_referer_msg'];
208
-            $msg .= '<br />' . sprintf($_lang["configcheck_hide_warning"], 'validate_referer');
208
+            $msg .= '<br />'.sprintf($_lang["configcheck_hide_warning"], 'validate_referer');
209 209
             $warnings[$i][1] = "<span id=\"validate_referer_warning_wrapper\">{$msg}</span>\n";
210 210
             break;
211 211
         case $_lang['configcheck_templateswitcher_present'] :
212 212
             $msg = $_lang["configcheck_templateswitcher_present_msg"];
213
-            if(isset($_SESSION['mgrPermissions']['save_plugin']) && $_SESSION['mgrPermissions']['save_plugin'] == '1') {
214
-                $msg .= '<br />' . $_lang["configcheck_templateswitcher_present_disable"];
213
+            if (isset($_SESSION['mgrPermissions']['save_plugin']) && $_SESSION['mgrPermissions']['save_plugin'] == '1') {
214
+                $msg .= '<br />'.$_lang["configcheck_templateswitcher_present_disable"];
215 215
             }
216
-            if(isset($_SESSION['mgrPermissions']['delete_plugin']) && $_SESSION['mgrPermissions']['delete_plugin'] == '1') {
217
-                $msg .= '<br />' . $_lang["configcheck_templateswitcher_present_delete"];
216
+            if (isset($_SESSION['mgrPermissions']['delete_plugin']) && $_SESSION['mgrPermissions']['delete_plugin'] == '1') {
217
+                $msg .= '<br />'.$_lang["configcheck_templateswitcher_present_delete"];
218 218
             }
219
-            $msg .= '<br />' . sprintf($_lang["configcheck_hide_warning"], 'templateswitcher_present');
219
+            $msg .= '<br />'.sprintf($_lang["configcheck_hide_warning"], 'templateswitcher_present');
220 220
             $warnings[$i][1] = "<span id=\"templateswitcher_present_warning_wrapper\">{$msg}</span>\n";
221 221
             break;
222 222
         case $_lang['configcheck_rb_base_dir'] :
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             $warnings[$i][1] = $_lang['configcheck_default_msg'];
230 230
     }
231 231
 
232
-    $admin_warning = $_SESSION['mgrRole']!=1 ? $_lang['configcheck_admin'] : "" ;
232
+    $admin_warning = $_SESSION['mgrRole'] != 1 ? $_lang['configcheck_admin'] : "";
233 233
     $config_check_results .= "
234 234
             <fieldset>
235 235
             <p><strong>".$_lang['configcheck_warning']."</strong> '".$warnings[$i][0]."'</p>
@@ -238,11 +238,11 @@  discard block
 block discarded – undo
238 238
             ".(isset($warnings[$i][2]) ? '<div style="padding-left:1em">'.$warnings[$i][2].'</div>' : '')."
239 239
             </fieldset>
240 240
 ";
241
-        if ($i!=count($warnings)-1) {
241
+        if ($i != count($warnings) - 1) {
242 242
             $config_check_results .= "<br />";
243 243
         }
244 244
     }
245
-    $_SESSION["mgrConfigCheck"]=true;
245
+    $_SESSION["mgrConfigCheck"] = true;
246 246
 } else {
247 247
     $config_check_results = $_lang['configcheck_ok'];
248 248
 }
Please login to merge, or discard this patch.
manager/includes/active_user_locks.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
@@ -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/messageCount.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
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
Please login to merge, or discard this patch.
manager/includes/protect.inc.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
     die();
11 11
 
12 12
 global $sanitize_seed;
13
-$sanitize_seed = 'sanitize_seed_' . base_convert(md5(__FILE__),16,36);
13
+$sanitize_seed = 'sanitize_seed_'.base_convert(md5(__FILE__), 16, 36);
14 14
 
15 15
 // sanitize array
16 16
 if (!function_exists('modx_sanitize_gpc')) {
17
-    function modx_sanitize_gpc(& $values, $depth=0) {
18
-        if(200 < $depth) exit('GPC Array nested too deep!');
19
-        if(is_array($values)) {
17
+    function modx_sanitize_gpc(& $values, $depth = 0){
18
+        if (200 < $depth) exit('GPC Array nested too deep!');
19
+        if (is_array($values)) {
20 20
             $depth++;
21 21
             foreach ($values as $key => $value) {
22 22
                 if (is_array($value)) modx_sanitize_gpc($value, $depth);
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
     }
30 30
 }
31 31
 
32
-function getSanitizedValue($value='') {
32
+function getSanitizedValue($value = ''){
33 33
     global $sanitize_seed;
34 34
 
35
-    if(!$value) return $value;
35
+    if (!$value) return $value;
36 36
 
37 37
     $brackets = explode(' ', '[[ ]] [! !] [* *] [( )] {{ }} [+ +] [~ ~] [^ ^]');
38
-    foreach($brackets as $bracket) {
39
-        if(strpos($value,$bracket)===false) continue;
40
-        $sanitizedBracket = str_replace('#', $sanitize_seed, sprintf('#%s#%s#', substr($bracket,0,1), substr($bracket,1,1)));
41
-        $value = str_replace($bracket,$sanitizedBracket,$value);
38
+    foreach ($brackets as $bracket) {
39
+        if (strpos($value, $bracket) === false) continue;
40
+        $sanitizedBracket = str_replace('#', $sanitize_seed, sprintf('#%s#%s#', substr($bracket, 0, 1), substr($bracket, 1, 1)));
41
+        $value = str_replace($bracket, $sanitizedBracket, $value);
42 42
     }
43 43
     $value = str_ireplace('<script', 'sanitized_by_modx<s cript', $value);
44 44
     $value = preg_replace('/&#(\d+);/', 'sanitized_by_modx& #$1', $value);
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 modx_sanitize_gpc($_GET);
49
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
49
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
50 50
     modx_sanitize_gpc($_POST);
51 51
 }
52 52
 modx_sanitize_gpc($_COOKIE);
53 53
 modx_sanitize_gpc($_REQUEST);
54 54
 
55
-foreach (array ('PHP_SELF', 'HTTP_USER_AGENT', 'HTTP_REFERER', 'QUERY_STRING') as $key) {
55
+foreach (array('PHP_SELF', 'HTTP_USER_AGENT', 'HTTP_REFERER', 'QUERY_STRING') as $key) {
56 56
     $_SERVER[$key] = isset ($_SERVER[$key]) ? htmlspecialchars($_SERVER[$key], ENT_QUOTES) : null;
57 57
 }
58 58
 
Please login to merge, or discard this patch.
manager/includes/manager.lockout.inc.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,75 +1,75 @@
 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
-if($modx->manager->action!='8' && isset($_SESSION['mgrValidated'])){
6
+if ($modx->manager->action != '8' && isset($_SESSION['mgrValidated'])) {
7 7
 
8
-    $homeurl = $modx->makeUrl($manager_login_startup>0 ? $manager_login_startup:$site_start);
8
+    $homeurl = $modx->makeUrl($manager_login_startup > 0 ? $manager_login_startup : $site_start);
9 9
     $logouturl = MODX_MANAGER_URL.'index.php?a=8';
10 10
 
11
-    $modx->setPlaceholder('modx_charset',$modx_manager_charset);
12
-    $modx->setPlaceholder('theme',$manager_theme);
11
+    $modx->setPlaceholder('modx_charset', $modx_manager_charset);
12
+    $modx->setPlaceholder('theme', $manager_theme);
13 13
 
14
-    $modx->setPlaceholder('site_name',$site_name);
15
-    $modx->setPlaceholder('logo_slogan',$_lang["logo_slogan"]);
16
-    $modx->setPlaceholder('manager_lockout_message',$_lang["manager_lockout_message"]);
14
+    $modx->setPlaceholder('site_name', $site_name);
15
+    $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]);
16
+    $modx->setPlaceholder('manager_lockout_message', $_lang["manager_lockout_message"]);
17 17
 
18
-    $modx->setPlaceholder('home',$_lang["home"]);
19
-    $modx->setPlaceholder('homeurl',$homeurl);
20
-    $modx->setPlaceholder('logout',$_lang["logout"]);
21
-    $modx->setPlaceholder('logouturl',$logouturl);
22
-    $modx->setPlaceholder('manager_theme_url',MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/');
23
-    $modx->setPlaceholder('year',date('Y'));
18
+    $modx->setPlaceholder('home', $_lang["home"]);
19
+    $modx->setPlaceholder('homeurl', $homeurl);
20
+    $modx->setPlaceholder('logout', $_lang["logout"]);
21
+    $modx->setPlaceholder('logouturl', $logouturl);
22
+    $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/');
23
+    $modx->setPlaceholder('year', date('Y'));
24 24
 
25 25
     // load template
26
-    if(!isset($modx->config['manager_lockout_tpl']) || empty($modx->config['manager_lockout_tpl'])) {
27
-    	$modx->config['manager_lockout_tpl'] = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl';
26
+    if (!isset($modx->config['manager_lockout_tpl']) || empty($modx->config['manager_lockout_tpl'])) {
27
+    	$modx->config['manager_lockout_tpl'] = MODX_MANAGER_PATH.'media/style/common/manager.lockout.tpl';
28 28
     }
29 29
 
30 30
     $target = $modx->config['manager_lockout_tpl'];
31 31
     $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target);
32 32
     $target = $modx->mergeSettingsContent($target);
33 33
 
34
-    if(substr($target,0,1)==='@') {
35
-    	if(substr($target,0,6)==='@CHUNK') {
36
-    		$target = trim(substr($target,7));
34
+    if (substr($target, 0, 1) === '@') {
35
+    	if (substr($target, 0, 6) === '@CHUNK') {
36
+    		$target = trim(substr($target, 7));
37 37
     		$lockout_tpl = $modx->getChunk($target);
38 38
     	}
39
-    	elseif(substr($target,0,5)==='@FILE') {
40
-    		$target = trim(substr($target,6));
39
+    	elseif (substr($target, 0, 5) === '@FILE') {
40
+    		$target = trim(substr($target, 6));
41 41
     		$lockout_tpl = file_get_contents($target);
42 42
     	}
43 43
 	} else {
44 44
     	$chunk = $modx->getChunk($target);
45
-    	if($chunk!==false && !empty($chunk)) {
45
+    	if ($chunk !== false && !empty($chunk)) {
46 46
     		$lockout_tpl = $chunk;
47 47
     	}
48
-    	elseif(is_file(MODX_BASE_PATH . $target)) {
49
-    		$target = MODX_BASE_PATH . $target;
48
+    	elseif (is_file(MODX_BASE_PATH.$target)) {
49
+    		$target = MODX_BASE_PATH.$target;
50 50
     		$lockout_tpl = file_get_contents($target);
51 51
     	}
52
-    	elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) {
53
-    		$target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl';
52
+    	elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/manager.lockout.tpl')) {
53
+    		$target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/manager.lockout.tpl';
54 54
     		$lockout_tpl = file_get_contents($target);
55 55
     	}
56
-	elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) {
57
-		$target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl';
56
+	elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/templates/actions/manager.lockout.tpl')) {
57
+		$target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/templates/actions/manager.lockout.tpl';
58 58
 		$login_tpl = file_get_contents($target);
59 59
 	}
60
-    	elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible
61
-    		$target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html';
60
+    	elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/manager.lockout.html')) { // ClipperCMS compatible
61
+    		$target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/manager.lockout.html';
62 62
     		$lockout_tpl = file_get_contents($target);
63 63
     	}
64 64
     	else {
65
-    		$target = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl';
65
+    		$target = MODX_MANAGER_PATH.'media/style/common/manager.lockout.tpl';
66 66
     		$lockout_tpl = file_get_contents($target);
67 67
     	}
68 68
 	}
69 69
 
70 70
     // merge placeholders
71 71
     $lockout_tpl = $modx->mergePlaceholderContent($lockout_tpl);
72
-    $regx = strpos($lockout_tpl,'[[+')!==false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers
72
+    $regx = strpos($lockout_tpl, '[[+') !== false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers
73 73
     $lockout_tpl = preg_replace($regx, '', $lockout_tpl); //cleanup
74 74
 
75 75
     echo $lockout_tpl;
Please login to merge, or discard this patch.