Completed
Push — develop ( d568f8...c061fc )
by Agel_Nash
06:25
created
manager/includes/extenders/message.quit.inc.php 1 patch
Spacing   +4 added lines, -4 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
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
     $errortype = array(
42 42
         E_ERROR          => "Error",
43 43
         E_WARNING        => "Warning",
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     $parsedMessageString .= "</tr>";
60 60
 
61 61
     $parsedMessageString .= "<tr><td valign='top'>&nbsp;&nbsp;Error type/ Nr.: </td>";
62
-    $parsedMessageString .= "<td colspan='2'>" . $errortype[$nr] . " - $nr</b></td><td>&nbsp;</td>";
62
+    $parsedMessageString .= "<td colspan='2'>".$errortype[$nr]." - $nr</b></td><td>&nbsp;</td>";
63 63
     $parsedMessageString .= "</tr>";
64 64
 
65 65
     $parsedMessageString .= "<tr><td>&nbsp;&nbsp;File: </td>";
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     $parsedMessageString .= "<tr><td>&nbsp;&nbsp;Line: </td>";
70 70
     $parsedMessageString .= "<td colspan='2'>$line</td><td>&nbsp;</td>";
71 71
     $parsedMessageString .= "</tr>";
72
-    if ($source!='') {
72
+    if ($source != '') {
73 73
         $parsedMessageString .= "<tr><td valign='top'>&nbsp;&nbsp;Line $line source: </td>";
74 74
         $parsedMessageString .= "<td colspan='2'>$source</td><td>&nbsp;</td>";
75 75
         $parsedMessageString .= "</tr>";
Please login to merge, or discard this patch.
manager/includes/tmplvars.format.inc.php 2 patches
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     $o = '';
22 22
 
23 23
     // process any TV commands in value
24
-    $docid = (int)$docid > 0 ? (int)$docid : $modx->documentIdentifier;
24
+    $docid = (int) $docid > 0 ? (int) $docid : $modx->documentIdentifier;
25 25
     $value = ProcessTVCommand($value, $name, $docid);
26 26
 
27 27
     $params = array();
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
                         $attr['align'] = $params['align'];
61 61
                     }
62 62
                     foreach ($attr as $k => $v) {
63
-                        $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : '');
63
+                        $attributes .= ($v ? ' '.$k.'="'.$v.'"' : '');
64 64
                     }
65
-                    $attributes .= ' ' . $params['attrib'];
65
+                    $attributes .= ' '.$params['attrib'];
66 66
 
67 67
                     // Output the image with attributes
68
-                    $o .= '<img' . rtrim($attributes) . ' />';
68
+                    $o .= '<img'.rtrim($attributes).' />';
69 69
                 }
70 70
             }
71 71
             break;
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
                         'target' => $params['target'],
132 132
                     );
133 133
                     foreach ($attr as $k => $v) {
134
-                        $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : '');
134
+                        $attributes .= ($v ? ' '.$k.'="'.$v.'"' : '');
135 135
                     }
136
-                    $attributes .= ' ' . $params['attrib']; // add extra
136
+                    $attributes .= ' '.$params['attrib']; // add extra
137 137
 
138 138
                     // Output the link
139
-                    $o .= '<a' . rtrim($attributes) . '>' . ($params['text'] ? $modx->htmlspecialchars($params['text']) : $name) . '</a>';
139
+                    $o .= '<a'.rtrim($attributes).'>'.($params['text'] ? $modx->htmlspecialchars($params['text']) : $name).'</a>';
140 140
                 }
141 141
             }
142 142
             break;
@@ -162,12 +162,12 @@  discard block
 block discarded – undo
162 162
                     'style' => $params['style'],
163 163
                 );
164 164
                 foreach ($attr as $k => $v) {
165
-                    $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : '');
165
+                    $attributes .= ($v ? ' '.$k.'="'.$v.'"' : '');
166 166
                 }
167
-                $attributes .= ' ' . $params['attrib']; // add extra
167
+                $attributes .= ' '.$params['attrib']; // add extra
168 168
 
169 169
                 // Output the HTML Tag
170
-                $o .= '<' . $tagname . rtrim($attributes) . '>' . $tagvalue . '</' . $tagname . '>';
170
+                $o .= '<'.$tagname.rtrim($attributes).'>'.$tagvalue.'</'.$tagname.'>';
171 171
             }
172 172
             break;
173 173
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $w = $params['w'] ? $params['w'] : '100%';
177 177
             $h = $params['h'] ? $params['h'] : '400px';
178 178
             $richtexteditor = $params['edt'] ? $params['edt'] : "";
179
-            $o = '<div class="MODX_RichTextWidget"><textarea id="' . $id . '" name="' . $id . '" style="width:' . $w . '; height:' . $h . ';">';
179
+            $o = '<div class="MODX_RichTextWidget"><textarea id="'.$id.'" name="'.$id.'" style="width:'.$w.'; height:'.$h.';">';
180 180
             $o .= $modx->htmlspecialchars($value);
181 181
             $o .= '</textarea></div>';
182 182
             $replace_richtext = array($id);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
         case "viewport":
205 205
             $value = parseInput($value);
206
-            $id = '_' . time();
206
+            $id = '_'.time();
207 207
             if (!$params['vpid']) {
208 208
                 $params['vpid'] = $id;
209 209
             }
@@ -217,37 +217,37 @@  discard block
 block discarded – undo
217 217
                 $h = "100%";
218 218
             }
219 219
             if ($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) {
220
-                $autoMode = "3";  //both
220
+                $autoMode = "3"; //both
221 221
             } elseif ($params['awidth'] == 'Yes') {
222 222
                 $autoMode = "1"; //width only
223 223
             } elseif ($params['aheight'] == 'Yes') {
224
-                $autoMode = "2";    //height only
224
+                $autoMode = "2"; //height only
225 225
             }
226 226
 
227
-            $modx->regClientStartupScript(MODX_MANAGER_URL . "media/script/bin/viewport.js", array(
227
+            $modx->regClientStartupScript(MODX_MANAGER_URL."media/script/bin/viewport.js", array(
228 228
                 'name' => 'viewport',
229 229
                 'version' => '0',
230 230
                 'plaintext' => false
231 231
             ));
232
-            $o = $sTag . " id='" . $params['vpid'] . "' name='" . $params['vpid'] . "' ";
232
+            $o = $sTag." id='".$params['vpid']."' name='".$params['vpid']."' ";
233 233
             if ($params['class']) {
234
-                $o .= " class='" . $params['class'] . "' ";
234
+                $o .= " class='".$params['class']."' ";
235 235
             }
236 236
             if ($params['style']) {
237
-                $o .= " style='" . $params['style'] . "' ";
237
+                $o .= " style='".$params['style']."' ";
238 238
             }
239 239
             if ($params['attrib']) {
240
-                $o .= $params['attrib'] . " ";
240
+                $o .= $params['attrib']." ";
241 241
             }
242
-            $o .= "scrolling='" . ($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto")) . "' ";
243
-            $o .= "src='" . $value . "' frameborder='" . $params['borsize'] . "' ";
244
-            $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'" . $params['vpid'] . "\\'," . $autoMode . ")',100);\" width='" . $w . "' height='" . $h . "' ";
242
+            $o .= "scrolling='".($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto"))."' ";
243
+            $o .= "src='".$value."' frameborder='".$params['borsize']."' ";
244
+            $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'".$params['vpid']."\\',".$autoMode.")',100);\" width='".$w."' height='".$h."' ";
245 245
             $o .= ">";
246 246
             $o .= $eTag;
247 247
             break;
248 248
 
249 249
         case "datagrid":
250
-            include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
250
+            include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
251 251
             $grd = new DataGrid('', $value);
252 252
 
253 253
             $grd->noRecordMsg = $params['egmsg'];
@@ -294,16 +294,16 @@  discard block
 block discarded – undo
294 294
             $o = '';
295 295
             /* If we are loading a file */
296 296
             if (substr($params['output'], 0, 5) == "@FILE") {
297
-                $file_name = MODX_BASE_PATH . trim(substr($params['output'], 6));
297
+                $file_name = MODX_BASE_PATH.trim(substr($params['output'], 6));
298 298
                 if (!file_exists($file_name)) {
299
-                    $widget_output = $file_name . ' does not exist';
299
+                    $widget_output = $file_name.' does not exist';
300 300
                 } else {
301 301
                     $widget_output = file_get_contents($file_name);
302 302
                 }
303 303
             } elseif (substr($params['output'], 0, 8) == '@INCLUDE') {
304
-                $file_name = MODX_BASE_PATH . trim(substr($params['output'], 9));
304
+                $file_name = MODX_BASE_PATH.trim(substr($params['output'], 9));
305 305
                 if (!file_exists($file_name)) {
306
-                    $widget_output = $file_name . ' does not exist';
306
+                    $widget_output = $file_name.' does not exist';
307 307
                 } else {
308 308
                     /* The included file needs to set $widget_output. Can be string, array, object */
309 309
                     include $file_name;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -363,7 +363,8 @@
 block discarded – undo
363 363
  * @return array|string
364 364
  */
365 365
 function parseInput($src, $delim = "||", $type = "string", $columns = true)
366
-{ // type can be: string, array
366
+{
367
+// type can be: string, array
367 368
     $modx = evolutionCMS();
368 369
     if ($modx->db->isResult($src)) {
369 370
         // must be a recordset
Please login to merge, or discard this patch.
manager/includes/header.inc.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -20,37 +20,37 @@  discard block
 block discarded – undo
20 20
 $body_class = '';
21 21
 $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
22 22
 if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
23
-    $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']];
23
+    $body_class .= ' '.$theme_modes[$_COOKIE['MODX_themeMode']];
24 24
 } elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
25
-    $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']];
25
+    $body_class .= ' '.$theme_modes[$modx->config['manager_theme_mode']];
26 26
 }
27 27
 
28
-$css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
28
+$css = 'media/style/'.$modx->config['manager_theme'].'/style.css?v='.$lastInstallTime;
29 29
 
30 30
 if ($modx->config['manager_theme'] == 'default') {
31
-    if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')
32
-        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
33
-        require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
31
+    if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')
32
+        && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) {
33
+        require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php';
34 34
         $minifier = new Formatter\CSSMinify();
35
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css');
36
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css');
37
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css');
38
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css');
39
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css');
40
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css');
41
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css');
42
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css');
43
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css');
44
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css');
45
-        $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css');
35
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css');
36
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css');
37
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css');
38
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css');
39
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css');
40
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css');
41
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css');
42
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css');
43
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css');
44
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css');
45
+        $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css');
46 46
         $css = $minifier->minify();
47 47
         file_put_contents(
48
-            MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css',
48
+            MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css',
49 49
             $css
50 50
         );
51 51
     }
52
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
53
-        $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
52
+    if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) {
53
+        $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime;
54 54
     }
55 55
 }
56 56
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
66 66
     <link rel="stylesheet" type="text/css" href="<?= $css ?>"/>
67 67
     <script type="text/javascript" src="media/script/tabpane.js"></script>
68
-    <?= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $modx->config['mgr_jquery_path']) ?>
68
+    <?= sprintf('<script type="text/javascript" src="%s"></script>'."\n", $modx->config['mgr_jquery_path']) ?>
69 69
     <?php if ($modx->config['show_picker'] != "0") {
70 70
     ?>
71 71
         <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js"
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     } ?>
83 83
 
84 84
     <!-- OnManagerMainFrameHeaderHTMLBlock -->
85
-    <?= $onManagerMainFrameHeaderHTMLBlock . "\n" ?>
85
+    <?= $onManagerMainFrameHeaderHTMLBlock."\n" ?>
86 86
 
87 87
     <script type="text/javascript">
88 88
       if (!evo) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     <script>
113 113
         <?php
114 114
         if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
115
-            echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
115
+            echo 'doRefresh('.$_REQUEST['r'].");\n";
116 116
         }
117 117
         ?>
118 118
     </script>
Please login to merge, or discard this patch.
Braces   +11 added lines, -11 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 />
4 4
     Please use the EVO Content Manager instead of accessing this file directly.");
5 5
 }
@@ -10,26 +10,26 @@  discard block
 block discarded – undo
10 10
 $modx_textdir = isset($modx_textdir) ? $modx_textdir : null;
11 11
 $onManagerMainFrameHeaderHTMLBlock = is_array($evtOut) ? implode("\n", $evtOut) : '';
12 12
 $textdir = $modx_textdir === 'rtl' ? 'rtl' : 'ltr';
13
-if (!isset($modx->config['mgr_jquery_path'])) {
13
+if (!isset($modx->config['mgr_jquery_path'])) {
14 14
     $modx->config['mgr_jquery_path'] = 'media/script/jquery/jquery.min.js';
15 15
 }
16
-if (!isset($modx->config['mgr_date_picker_path'])) {
16
+if (!isset($modx->config['mgr_date_picker_path'])) {
17 17
     $modx->config['mgr_date_picker_path'] = 'media/script/air-datepicker/datepicker.inc.php';
18 18
 }
19 19
 
20 20
 $body_class = '';
21 21
 $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
22
-if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
22
+if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
23 23
     $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']];
24
-} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
24
+} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
25 25
     $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']];
26 26
 }
27 27
 
28 28
 $css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
29 29
 
30
-if ($modx->config['manager_theme'] == 'default') {
30
+if ($modx->config['manager_theme'] == 'default') {
31 31
     if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')
32
-        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
32
+        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
33 33
         require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
34 34
         $minifier = new Formatter\CSSMinify();
35 35
         $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $css
50 50
         );
51 51
     }
52
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
52
+    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
53 53
         $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
54 54
     }
55 55
 }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     <link rel="stylesheet" type="text/css" href="<?= $css ?>"/>
67 67
     <script type="text/javascript" src="media/script/tabpane.js"></script>
68 68
     <?= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $modx->config['mgr_jquery_path']) ?>
69
-    <?php if ($modx->config['show_picker'] != "0") {
69
+    <?php if ($modx->config['show_picker'] != "0") {
70 70
     ?>
71 71
         <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js"
72 72
                 type="text/javascript"></script>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 } ?>
75 75
     <?php
76 76
     $aArr = array('2');
77
-    if (!in_array($_REQUEST['a'], $aArr)) {
77
+    if (!in_array($_REQUEST['a'], $aArr)) {
78 78
         ?>
79 79
         <script src="media/script/mootools/mootools.js" type="text/javascript"></script>
80 80
         <script src="media/script/mootools/moodx.js" type="text/javascript"></script>
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     <script src="media/script/main.js"></script>
112 112
     <script>
113 113
         <?php
114
-        if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
114
+        if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
115 115
             echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
116 116
         }
117 117
         ?>
Please login to merge, or discard this patch.
manager/includes/log.class.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,16 +36,16 @@  discard block
 block discarded – undo
36 36
         $action = "",
37 37
         $itemid = "",
38 38
         $itemname = ""
39
-    ) {
39
+    ){
40 40
         $modx = evolutionCMS();
41 41
         $this->entry['msg'] = $msg; // writes testmessage to the object
42
-        $this->entry['action'] = empty($action) ? $modx->manager->action : $action;    // writes the action to the object
42
+        $this->entry['action'] = empty($action) ? $modx->manager->action : $action; // writes the action to the object
43 43
 
44 44
         // User Credentials
45 45
         $this->entry['internalKey'] = $internalKey == "" ? $modx->getLoginUserID() : $internalKey;
46 46
         $this->entry['username'] = $username == "" ? $modx->getLoginUserName() : $username;
47 47
 
48
-        $this->entry['itemId'] = (empty($itemid) && isset($_REQUEST['id'])) ? (int)$_REQUEST['id'] : $itemid;  // writes the id to the object
48
+        $this->entry['itemId'] = (empty($itemid) && isset($_REQUEST['id'])) ? (int) $_REQUEST['id'] : $itemid; // writes the id to the object
49 49
         if ($this->entry['itemId'] == 0) {
50 50
             $this->entry['itemId'] = "-";
51 51
         } // to stop items having id 0
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
             
97 97
         $insert_id = $modx->db->insert($fields, $tbl_manager_log);
98 98
         if (!$insert_id) {
99
-            $modx->messageQuit("Logging error: couldn't save log to table! Error code: " . $modx->db->getLastError());
99
+            $modx->messageQuit("Logging error: couldn't save log to table! Error code: ".$modx->db->getLastError());
100 100
         } else {
101
-            $limit = (isset($modx->config['manager_log_limit'])) ? (int)$modx->config['manager_log_limit'] : 3000;
102
-            $trim = (isset($modx->config['manager_log_trim'])) ? (int)$modx->config['manager_log_trim'] : 100;
101
+            $limit = (isset($modx->config['manager_log_limit'])) ? (int) $modx->config['manager_log_limit'] : 3000;
102
+            $trim = (isset($modx->config['manager_log_trim'])) ? (int) $modx->config['manager_log_trim'] : 100;
103 103
             if (($insert_id % $trim) === 0) {
104 104
                 $modx->rotate_log('manager_log', $limit, $trim);
105 105
             }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     private function getUserIP()
110 110
     {
111 111
         if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
112
-            if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')>0) {
112
+            if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') > 0) {
113 113
                 $addr = explode(",", $_SERVER['HTTP_X_FORWARDED_FOR']);
114 114
                 return trim($addr[0]);
115 115
             } else {
Please login to merge, or discard this patch.
manager/includes/debug.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 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
 // show debug information
7
-if (isset($enable_debug) && $enable_debug==true) {
7
+if (isset($enable_debug) && $enable_debug == true) {
8 8
     ?>
9 9
 	<script language="javascript">
10 10
 	//document.onload = removeDebug();
Please login to merge, or discard this patch.
manager/includes/veriword.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
     public $im_height  = 0;
54 54
     public $im;
55 55
 
56
-    public function __construct($w=200, $h=80)
56
+    public function __construct($w = 200, $h = 80)
57 57
     {
58 58
         /* create session to set word for verification */
59 59
         $this->set_veriword();
60
-        $this->dir_font = dirname(__FILE__) . '/' . $this->dir_font;
60
+        $this->dir_font = dirname(__FILE__).'/'.$this->dir_font;
61 61
         $this->im_width         = $w;
62 62
         $this->im_height        = $h;
63 63
     }
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $modx = evolutionCMS();
84 84
         // set default words
85
-        $words="MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote";
85
+        $words = "MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote";
86 86
         $words = $modx->config['captcha_words'] ? $modx->config['captcha_words'] : $words;
87 87
         $arr_words = array_filter(array_map('trim', explode(',', $words)));
88 88
 
89 89
         /* pick one randomly for text verification */
90
-        return (string) $arr_words[array_rand($arr_words)] . rand(10, 999);
90
+        return (string) $arr_words[array_rand($arr_words)].rand(10, 999);
91 91
     }
92 92
 
93 93
     public function draw_text()
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $fontstmp = array();
97 97
         while (false !== ($file = $dir->read())) {
98 98
             if (substr($file, -4) == '.ttf') {
99
-                $fontstmp[] = $this->dir_font . $file;
99
+                $fontstmp[] = $this->dir_font.$file;
100 100
             }
101 101
         }
102 102
         $dir->close();
@@ -108,20 +108,20 @@  discard block
 block discarded – undo
108 108
         $text_size  = 30;
109 109
         /* calculate text width and height */
110 110
         $box        = imagettfbbox($text_size, $text_angle, $text_font, $this->word);
111
-        $text_width = $box[2]-$box[0]; //text width
112
-        $text_height= $box[5]-$box[3]; //text height
111
+        $text_width = $box[2] - $box[0]; //text width
112
+        $text_height = $box[5] - $box[3]; //text height
113 113
 
114 114
         /* adjust text size */
115
-        $text_size  = round((20 * $this->im_width)/$text_width);
115
+        $text_size  = round((20 * $this->im_width) / $text_width);
116 116
 
117 117
         /* recalculate text width and height */
118 118
         $box        = imagettfbbox($text_size, $text_angle, $text_font, $this->word);
119
-        $text_width = $box[2]-$box[0]; //text width
120
-        $text_height= $box[5]-$box[3]; //text height
119
+        $text_width = $box[2] - $box[0]; //text width
120
+        $text_height = $box[5] - $box[3]; //text height
121 121
 
122 122
         /* calculate center position of text */
123
-        $text_x         = ($this->im_width - $text_width)/2;
124
-        $text_y         = ($this->im_height - $text_height)/2;
123
+        $text_x         = ($this->im_width - $text_width) / 2;
124
+        $text_y         = ($this->im_height - $text_height) / 2;
125 125
 
126 126
         /* create canvas for text drawing */
127 127
         $im_text        = imagecreate($this->im_width, $this->im_height);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
 
152 152
         /* pick one background image randomly from image directory */
153
-        $img_file       = $this->dir_noise . "noise" . rand(1, 4) . ".jpg";
153
+        $img_file       = $this->dir_noise."noise".rand(1, 4).".jpg";
154 154
 
155 155
         /* create "noise" background image from your image stock*/
156 156
         $noise_img      = @imagecreatefromjpeg($img_file);
Please login to merge, or discard this patch.
manager/includes/actionlist.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
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
  * @param string $itemid
140 140
  * @return string
141 141
  */
142
-function getAction($actionId, $itemid='')
142
+function getAction($actionId, $itemid = '')
143 143
 {
144 144
     global $action_list;
145 145
 
Please login to merge, or discard this patch.
manager/includes/footer.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
 global $SystemAlertMsgQueque;
Please login to merge, or discard this patch.
manager/includes/manager.lockout.inc.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  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
-if ($modx->manager->action!='8' && isset($_SESSION['mgrValidated'])) {
7
-    $homeurl = $modx->makeUrl($manager_login_startup>0 ? $manager_login_startup:$site_start);
8
-    $logouturl = MODX_MANAGER_URL . 'index.php?a=8';
6
+if ($modx->manager->action != '8' && isset($_SESSION['mgrValidated'])) {
7
+    $homeurl = $modx->makeUrl($manager_login_startup > 0 ? $manager_login_startup : $site_start);
8
+    $logouturl = MODX_MANAGER_URL.'index.php?a=8';
9 9
 
10 10
     $modx->setPlaceholder('modx_charset', $modx_manager_charset);
11 11
     $modx->setPlaceholder('theme', $manager_theme);
@@ -18,51 +18,51 @@  discard block
 block discarded – undo
18 18
     $modx->setPlaceholder('homeurl', $homeurl);
19 19
     $modx->setPlaceholder('logout', $_lang["logout"]);
20 20
     $modx->setPlaceholder('logouturl', $logouturl);
21
-    $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/');
21
+    $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/');
22 22
     $modx->setPlaceholder('year', date('Y'));
23 23
 
24 24
     // load template
25 25
     if (!isset($modx->config['manager_lockout_tpl']) || empty($modx->config['manager_lockout_tpl'])) {
26
-        $modx->config['manager_lockout_tpl'] = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl';
26
+        $modx->config['manager_lockout_tpl'] = MODX_MANAGER_PATH.'media/style/common/manager.lockout.tpl';
27 27
     }
28 28
 
29 29
     $target = $modx->config['manager_lockout_tpl'];
30 30
     $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target);
31 31
     $target = $modx->mergeSettingsContent($target);
32 32
 
33
-    if (substr($target, 0, 1)==='@') {
34
-        if (substr($target, 0, 6)==='@CHUNK') {
33
+    if (substr($target, 0, 1) === '@') {
34
+        if (substr($target, 0, 6) === '@CHUNK') {
35 35
             $target = trim(substr($target, 7));
36 36
             $lockout_tpl = $modx->getChunk($target);
37
-        } elseif (substr($target, 0, 5)==='@FILE') {
37
+        } elseif (substr($target, 0, 5) === '@FILE') {
38 38
             $target = trim(substr($target, 6));
39 39
             $lockout_tpl = file_get_contents($target);
40 40
         }
41 41
     } else {
42 42
         $chunk = $modx->getChunk($target);
43
-        if ($chunk!==false && !empty($chunk)) {
43
+        if ($chunk !== false && !empty($chunk)) {
44 44
             $lockout_tpl = $chunk;
45
-        } elseif (is_file(MODX_BASE_PATH . $target)) {
46
-            $target = MODX_BASE_PATH . $target;
45
+        } elseif (is_file(MODX_BASE_PATH.$target)) {
46
+            $target = MODX_BASE_PATH.$target;
47 47
             $lockout_tpl = file_get_contents($target);
48
-        } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) {
49
-            $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl';
48
+        } elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/manager.lockout.tpl')) {
49
+            $target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/manager.lockout.tpl';
50 50
             $lockout_tpl = file_get_contents($target);
51
-        } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) {
52
-            $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl';
51
+        } elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/templates/actions/manager.lockout.tpl')) {
52
+            $target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/templates/actions/manager.lockout.tpl';
53 53
             $login_tpl = file_get_contents($target);
54
-        } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible
55
-            $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html';
54
+        } elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/manager.lockout.html')) { // ClipperCMS compatible
55
+            $target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/manager.lockout.html';
56 56
             $lockout_tpl = file_get_contents($target);
57 57
         } else {
58
-            $target = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl';
58
+            $target = MODX_MANAGER_PATH.'media/style/common/manager.lockout.tpl';
59 59
             $lockout_tpl = file_get_contents($target);
60 60
         }
61 61
     }
62 62
 
63 63
     // merge placeholders
64 64
     $lockout_tpl = $modx->mergePlaceholderContent($lockout_tpl);
65
-    $regx = strpos($lockout_tpl, '[[+')!==false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers
65
+    $regx = strpos($lockout_tpl, '[[+') !== false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers
66 66
     $lockout_tpl = preg_replace($regx, '', $lockout_tpl); //cleanup
67 67
 
68 68
     echo $lockout_tpl;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@
 block discarded – undo
51 51
         } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) {
52 52
             $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl';
53 53
             $login_tpl = file_get_contents($target);
54
-        } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible
54
+        } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) {
55
+// ClipperCMS compatible
55 56
             $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html';
56 57
             $lockout_tpl = file_get_contents($target);
57 58
         } else {
Please login to merge, or discard this patch.