Completed
Push — develop ( dba6d0...45e39e )
by Agel_Nash
12:14
created
manager/includes/extenders/modifiers/mdf_addbreak.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 $text = $modx->getModifiers()->parseDocumentSource($value);
3
-$text = str_replace(array("\r\n","\r"),"\n",$text);
3
+$text = str_replace(array("\r\n", "\r"), "\n", $text);
4 4
 
5 5
 $blockElms  = 'br,table,tbody,tr,td,th,thead,tfoot,caption,colgroup,div';
6 6
 $blockElms .= ',dl,dd,dt,ul,ol,li,pre,select,option,form,map,area,blockquote';
7 7
 $blockElms .= ',address,math,style,input,p,h1,h2,h3,h4,h5,h6,hr,object,param,embed';
8 8
 $blockElms .= ',noframes,noscript,section,article,aside,hgroup,footer,address,code';
9 9
 $blockElms = explode(',', $blockElms);
10
-$lines = explode("\n",$text);
10
+$lines = explode("\n", $text);
11 11
 $c = count($lines);
12
-foreach($lines as $i=>$line)
12
+foreach ($lines as $i=>$line)
13 13
 {
14 14
     $line = rtrim($line);
15
-    if($i===$c-1) break;
16
-    foreach($blockElms as $block)
15
+    if ($i === $c - 1) break;
16
+    foreach ($blockElms as $block)
17 17
     {
18
-        if(preg_match("@</?{$block}" . '[^>]*>$@',$line))
18
+        if (preg_match("@</?{$block}".'[^>]*>$@', $line))
19 19
             continue 2;
20 20
     }
21 21
     $lines[$i] = "{$line}<br />";
Please login to merge, or discard this patch.
manager/includes/functions/actions/import.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!function_exists('run')) {
2
+if (!function_exists('run')) {
3 3
     /**
4 4
      * @return string
5 5
      */
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
             $modx->getDatabase()->query("ALTER TABLE {$tbl_site_content} AUTO_INCREMENT = 1");
29 29
         }
30 30
 
31
-        $parent = (int)$_POST['parent'];
31
+        $parent = (int) $_POST['parent'];
32 32
 
33
-        if (is_dir(MODX_BASE_PATH . 'temp/import')) {
34
-            $filedir = MODX_BASE_PATH . 'temp/import/';
35
-        } elseif (is_dir(MODX_BASE_PATH . 'assets/import')) {
36
-            $filedir = MODX_BASE_PATH . 'assets/import/';
33
+        if (is_dir(MODX_BASE_PATH.'temp/import')) {
34
+            $filedir = MODX_BASE_PATH.'temp/import/';
35
+        } elseif (is_dir(MODX_BASE_PATH.'assets/import')) {
36
+            $filedir = MODX_BASE_PATH.'assets/import/';
37 37
         } else {
38 38
             $filedir = '';
39 39
         }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $files = pop_index($files);
45 45
 
46 46
         // no. of files to import
47
-        $output .= sprintf('<p>' . $_lang['import_files_found'] . '</p>', $filesfound);
47
+        $output .= sprintf('<p>'.$_lang['import_files_found'].'</p>', $filesfound);
48 48
 
49 49
         // import files
50 50
         if (0 < count($files)) {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $mtime = $mtime[1] + $mtime[0];
58 58
         $importend = $mtime;
59 59
         $totaltime = ($importend - $importstart);
60
-        $output .= sprintf('<p>' . $_lang['import_site_time'] . '</p>', round($totaltime, 3));
60
+        $output .= sprintf('<p>'.$_lang['import_site_time'].'</p>', round($totaltime, 3));
61 61
 
62 62
         if ($_POST['convert_link'] == 'on') {
63 63
             convertLink();
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     }
68 68
 }
69 69
 
70
-if(!function_exists('importFiles')) {
70
+if (!function_exists('importFiles')) {
71 71
     /**
72 72
      * @param int $parent
73 73
      * @param string $filedir
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             if (is_array($value)) {
99 99
                 // create folder
100 100
                 $alias = $id;
101
-                printf('<span>' . $_lang['import_site_importing_document'] . '</span>', $alias);
101
+                printf('<span>'.$_lang['import_site_importing_document'].'</span>', $alias);
102 102
                 $field = array();
103 103
                 $field['type'] = 'document';
104 104
                 $field['contentType'] = 'text/html';
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                              'index.html',
118 118
                              'index.htm'
119 119
                          ) as $filename) {
120
-                    $filepath = $filedir . $alias . '/' . $filename;
120
+                    $filepath = $filedir.$alias.'/'.$filename;
121 121
                     if ($find === false && file_exists($filepath)) {
122 122
                         $file = getFileContent($filepath);
123 123
                         list($pagetitle, $content, $description) = treatContent($file, $filename, $alias);
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
                         $newid = $modx->getDatabase()->insert($field, $tbl_site_content);
133 133
                         if ($newid) {
134 134
                             $find = true;
135
-                            echo ' - <span class="success">' . $_lang['import_site_success'] . '</span><br />' . "\n";
136
-                            importFiles($newid, $filedir . $alias . '/', $value, 'sub');
135
+                            echo ' - <span class="success">'.$_lang['import_site_success'].'</span><br />'."\n";
136
+                            importFiles($newid, $filedir.$alias.'/', $value, 'sub');
137 137
                         } else {
138
-                            echo '<span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_db_error"] . $modx->getDatabase()->getLastError();
138
+                            echo '<span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_db_error"].$modx->getDatabase()->getLastError();
139 139
                             exit;
140 140
                         }
141 141
                     }
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
                     $newid = $modx->getDatabase()->insert($field, $tbl_site_content);
151 151
                     if ($newid) {
152 152
                         $find = true;
153
-                        echo ' - <span class="success">' . $_lang['import_site_success'] . '</span><br />' . "\n";
154
-                        importFiles($newid, $filedir . $alias . '/', $value, 'sub');
153
+                        echo ' - <span class="success">'.$_lang['import_site_success'].'</span><br />'."\n";
154
+                        importFiles($newid, $filedir.$alias.'/', $value, 'sub');
155 155
                     } else {
156
-                        echo '<span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_db_error"] . $modx->getDatabase()->getLastError();
156
+                        echo '<span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_db_error"].$modx->getDatabase()->getLastError();
157 157
                         exit;
158 158
                     }
159 159
                 }
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
                 $fparts = explode('.', $value);
167 167
                 $alias = $fparts[0];
168 168
                 $ext = (count($fparts) > 1) ? $fparts[count($fparts) - 1] : "";
169
-                printf("<span>" . $_lang['import_site_importing_document'] . "</span>", $filename);
169
+                printf("<span>".$_lang['import_site_importing_document']."</span>", $filename);
170 170
 
171 171
                 if (!in_array($ext, $allowedfiles)) {
172
-                    echo ' - <span class="fail">' . $_lang["import_site_skip"] . '</span><br />' . "\n";
172
+                    echo ' - <span class="fail">'.$_lang["import_site_skip"].'</span><br />'."\n";
173 173
                 } else {
174
-                    $filepath = $filedir . $filename;
174
+                    $filepath = $filedir.$filename;
175 175
                     $file = getFileContent($filepath);
176 176
                     list($pagetitle, $content, $description) = treatContent($file, $filename, $alias);
177 177
 
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
                     $field['menuindex'] = ($alias == 'index') ? 0 : 2;
198 198
                     $newid = $modx->getDatabase()->insert($field, $tbl_site_content);
199 199
                     if ($newid) {
200
-                        echo ' - <span class="success">' . $_lang['import_site_success'] . '</span><br />' . "\n";
200
+                        echo ' - <span class="success">'.$_lang['import_site_success'].'</span><br />'."\n";
201 201
                     } else {
202
-                        echo '<span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_db_error"] . $modx->getDatabase()->getLastError();
202
+                        echo '<span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_db_error"].$modx->getDatabase()->getLastError();
203 203
                         exit;
204 204
                     }
205 205
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     }
219 219
 }
220 220
 
221
-if(!function_exists('getFiles')) {
221
+if (!function_exists('getFiles')) {
222 222
     /**
223 223
      * @param string $directory
224 224
      * @param array $listing
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
             foreach ($files as $file) {
235 235
                 if ($file == '.' || $file == '..') {
236 236
                     continue;
237
-                } elseif ($h = @opendir($directory . $file . "/")) {
237
+                } elseif ($h = @opendir($directory.$file."/")) {
238 238
                     closedir($h);
239 239
                     $count = -1;
240
-                    $listing[$file] = getFiles($directory . $file . "/", array(), $count + 1);
240
+                    $listing[$file] = getFiles($directory.$file."/", array(), $count + 1);
241 241
                 } elseif (strpos($file, '.htm') !== false) {
242 242
                     $listing[$dummy] = $file;
243 243
                     $dummy = $dummy + 1;
@@ -245,14 +245,14 @@  discard block
 block discarded – undo
245 245
                 }
246 246
             }
247 247
         } else {
248
-            echo '<p><span class="fail">' . $_lang["import_site_failed"] . "</span> " . $_lang["import_site_failed_no_open_dir"] . $directory . ".</p>";
248
+            echo '<p><span class="fail">'.$_lang["import_site_failed"]."</span> ".$_lang["import_site_failed_no_open_dir"].$directory.".</p>";
249 249
         }
250 250
 
251 251
         return ($listing);
252 252
     }
253 253
 }
254 254
 
255
-if(!function_exists('getFileContent')) {
255
+if (!function_exists('getFileContent')) {
256 256
     /**
257 257
      * @param string $filepath
258 258
      * @return bool|string
@@ -262,14 +262,14 @@  discard block
 block discarded – undo
262 262
         global $_lang;
263 263
         // get the file
264 264
         if (!$buffer = file_get_contents($filepath)) {
265
-            echo '<p><span class="fail">' . $_lang['import_site_failed'] . "</span> " . $_lang["import_site_failed_no_retrieve_file"] . $filepath . ".</p>";
265
+            echo '<p><span class="fail">'.$_lang['import_site_failed']."</span> ".$_lang["import_site_failed_no_retrieve_file"].$filepath.".</p>";
266 266
         } else {
267 267
             return $buffer;
268 268
         }
269 269
     }
270 270
 }
271 271
 
272
-if(!function_exists('pop_index')) {
272
+if (!function_exists('pop_index')) {
273 273
     /**
274 274
      * @param array $array
275 275
      * @return array
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     }
295 295
 }
296 296
 
297
-if(!function_exists('treatContent')) {
297
+if (!function_exists('treatContent')) {
298 298
     /**
299 299
      * @param string $src
300 300
      * @param string $filename
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         } else {
330 330
             $content = $src;
331 331
             $s = '/(<meta[^>]+charset\s*=)[^>"\'=]+(.+>)/i';
332
-            $r = '$1' . $modx->config['modx_charset'] . '$2';
332
+            $r = '$1'.$modx->config['modx_charset'].'$2';
333 333
             $content = preg_replace($s, $r, $content);
334 334
             $content = preg_replace('@<title>.*</title>@i', "<title>[*pagetitle*]</title>", $content);
335 335
         }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     }
346 346
 }
347 347
 
348
-if(!function_exists('convertLink')) {
348
+if (!function_exists('convertLink')) {
349 349
     /**
350 350
      * @return void
351 351
      */
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                     list($href, $v) = explode('"', $v, 2);
369 369
                     $_ = $href;
370 370
                     if (strpos($_, $modx->config['site_url']) !== false) {
371
-                        $_ = $modx->config['base_url'] . str_replace($modx->config['site_url'], '', $_);
371
+                        $_ = $modx->config['base_url'].str_replace($modx->config['site_url'], '', $_);
372 372
                     }
373 373
                     if ($_[0] === '/') {
374 374
                         $_ = substr($_, 1);
@@ -395,15 +395,15 @@  discard block
 block discarded – undo
395 395
                     if (strpos($_, '/') !== false) {
396 396
                         $_ = substr($_, strrpos($_, '/'));
397 397
                     }
398
-                    $_ = $dir . str_replace('.html', '', $_);
398
+                    $_ = $dir.str_replace('.html', '', $_);
399 399
                     if (!isset($target[$_])) {
400 400
                         $target[$_] = $modx->getIdFromAlias($_);
401 401
                     }
402 402
                     $target[$_] = trim($target[$_]);
403 403
                     if (!empty($target[$_])) {
404
-                        $href = '[~' . $target[$_] . '~]';
404
+                        $href = '[~'.$target[$_].'~]';
405 405
                     }
406
-                    $array[$c] = '<a href="' . $href . '"' . $v;
406
+                    $array[$c] = '<a href="'.$href.'"'.$v;
407 407
                 }
408 408
                 $c++;
409 409
             }
Please login to merge, or discard this patch.
manager/includes/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * @see https://github.com/theseer/Autoload
4 4
  */
5 5
 spl_autoload_register(
6
-    function($class) {
6
+    function($class){
7 7
         static $classes = null;
8 8
         if ($classes === null) {
9 9
             $classes = array(
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
         $cn = strtolower($class);
68 68
         if (isset($classes[$cn])) {
69
-            require __DIR__ . $classes[$cn];
69
+            require __DIR__.$classes[$cn];
70 70
         }
71 71
     },
72 72
     true,
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/core/autoload.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 $modx = evolutionCMS();
27 27
 $modx->getDatabase()->connect();
28 28
 startCMSSession();
29
-if(!isset($_SESSION['mgrValidated'])) {
29
+if (!isset($_SESSION['mgrValidated'])) {
30 30
         die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
31 31
 }
32 32
 define('IN_MANAGER_MODE', true);
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 $manager_language = $modx->config['manager_language'];
36 36
 // Pass language code from MODX to KCFinder
37
-if(!file_exists("../../../includes/lang/".$manager_language.".inc.php")) {
37
+if (!file_exists("../../../includes/lang/".$manager_language.".inc.php")) {
38 38
     $manager_language = "english"; // if not set, get the english language file.
39 39
 }
40 40
 include_once "../../../includes/lang/".$manager_language.".inc.php";
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 // PHP VERSION CHECK
44 44
 if (substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.')) < 5)
45
-    die("You are using PHP " . PHP_VERSION . " when KCFinder require at least version 5! Some systems has an option to change the active PHP version. Please refer to your hosting provider or upgrade your PHP distribution.");
45
+    die("You are using PHP ".PHP_VERSION." when KCFinder require at least version 5! Some systems has an option to change the active PHP version. Please refer to your hosting provider or upgrade your PHP distribution.");
46 46
 
47 47
 
48 48
 // SAFE MODE CHECK
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 
53 53
 // MAGIC AUTOLOAD CLASSES FUNCTION
54
-function autoloadda9d06472ccb71b84928677ce2a6ca89($class) {
54
+function autoloadda9d06472ccb71b84928677ce2a6ca89($class){
55 55
     static $classes = null;
56 56
     if ($classes === null) {
57 57
         $classes = array(
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         );
76 76
     }
77 77
     if (isset($classes[$class])) {
78
-        require dirname(__FILE__) . $classes[$class];
78
+        require dirname(__FILE__).$classes[$class];
79 79
     }
80 80
 }
81 81
 spl_autoload_register('autoloadda9d06472ccb71b84928677ce2a6ca89', true);
@@ -84,18 +84,18 @@  discard block
 block discarded – undo
84 84
 // json_encode() IMPLEMENTATION IF JSON EXTENSION IS MISSING
85 85
 if (!function_exists("json_encode")) {
86 86
 
87
-    function kcfinder_json_string_encode($string) {
88
-        return '"' .
87
+    function kcfinder_json_string_encode($string){
88
+        return '"'.
89 89
             str_replace('/', "\\/",
90 90
             str_replace("\t", "\\t",
91 91
             str_replace("\r", "\\r",
92 92
             str_replace("\n", "\\n",
93 93
             str_replace('"', "\\\"",
94 94
             str_replace("\\", "\\\\",
95
-        $string)))))) . '"';
95
+        $string)))))).'"';
96 96
     }
97 97
 
98
-    function json_encode($data) {
98
+    function json_encode($data){
99 99
 
100 100
         if (is_array($data)) {
101 101
             $ret = array();
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
             // OBJECT
104 104
             if (array_keys($data) !== range(0, count($data) - 1)) {
105 105
                 foreach ($data as $key => $val)
106
-                    $ret[] = kcfinder_json_string_encode($key) . ':' . json_encode($val);
107
-                return "{" . implode(",", $ret) . "}";
106
+                    $ret[] = kcfinder_json_string_encode($key).':'.json_encode($val);
107
+                return "{".implode(",", $ret)."}";
108 108
 
109 109
             // ARRAY
110 110
             } else {
111 111
                 foreach ($data as $val)
112 112
                     $ret[] = json_encode($val);
113
-                return "[" . implode(",", $ret) . "]";
113
+                return "[".implode(",", $ret)."]";
114 114
             }
115 115
 
116 116
         // BOOLEAN OR NULL
Please login to merge, or discard this patch.
manager/frames/tree.php 1 patch
Spacing   +13 added lines, -13 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 6
 // invoke OnManagerTreeInit event
7 7
 $evtOut = $modx->invokeEvent('OnManagerTreeInit', $_REQUEST);
8
-if(is_array($evtOut)) {
8
+if (is_array($evtOut)) {
9 9
 	echo implode("\n", $evtOut);
10 10
 }
11 11
 ?>
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<a class="treeButton" id="treeMenu_collapsetree" onclick="modx.tree.collapseTree();" title="<?php echo $_lang['collapse_tree']; ?>"><?php echo $_style['collapse_tree']; ?></a>
19 19
 
20
-		<?php if($modx->hasPermission('new_document')) { ?>
20
+		<?php if ($modx->hasPermission('new_document')) { ?>
21 21
 			<a class="treeButton" id="treeMenu_addresource" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=4', title: '<?php echo $_lang['add_resource']; ?>'});" title="<?php echo $_lang['add_resource']; ?>"><?php echo $_style['add_doc_tree']; ?></a>
22 22
 			<a class="treeButton" id="treeMenu_addweblink" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=72', title: '<?php echo $_lang['add_weblink']; ?>'});" title="<?php echo $_lang['add_weblink']; ?>"><?php echo $_style['add_weblink_tree']; ?></a>
23 23
 		<?php } ?>
@@ -26,23 +26,23 @@  discard block
 block discarded – undo
26 26
 
27 27
 		<a class="treeButton" id="treeMenu_sortingtree" onclick="modx.tree.showSorter(event);" title="<?php echo $_lang['sort_tree']; ?>"><?php echo $_style['sort_tree']; ?></a>
28 28
 
29
-		<?php if($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { ?>
29
+		<?php if ($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { ?>
30 30
 			<a class="treeButton" id="treeMenu_sortingindex" onclick="modx.tabs({url: '<?= MODX_MANAGER_URL ?>?a=56&id=0', title: '<?php echo $_lang['sort_menuindex']; ?>'});" title="<?php echo $_lang['sort_menuindex']; ?>"><?php echo $_style['sort_menuindex']; ?></a>
31 31
 		<?php } ?>
32 32
 
33
-		<?php if($use_browser && $modx->hasPermission('assets_images')) { ?>
34
-			<a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a>
33
+		<?php if ($use_browser && $modx->hasPermission('assets_images')) { ?>
34
+			<a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a>
35 35
 		<?php } ?>
36 36
 
37
-		<?php if($use_browser && $modx->hasPermission('assets_files')) { ?>
38
-			<a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a>
37
+		<?php if ($use_browser && $modx->hasPermission('assets_files')) { ?>
38
+			<a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a>
39 39
 		<?php } ?>
40 40
 
41
-		<?php if($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?>
42
-			<a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a>
41
+		<?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?>
42
+			<a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a>
43 43
 		<?php } ?>
44 44
 
45
-		<?php if($modx->hasPermission('empty_trash')) { ?>
45
+		<?php if ($modx->hasPermission('empty_trash')) { ?>
46 46
 			<a class="treeButton treeButtonDisabled" id="treeMenu_emptytrash" title="<?php echo $_lang['empty_recycle_bin_empty']; ?>"><?php echo $_style['empty_recycle_bin_empty']; ?></a>
47 47
 		<?php } ?>
48 48
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		<?php
55 55
 		// invoke OnManagerTreePrerender event
56 56
 		$evtOut = $modx->invokeEvent('OnManagerTreePrerender', $modx->getDatabase()->escape($_REQUEST));
57
-		if(is_array($evtOut)) {
57
+		if (is_array($evtOut)) {
58 58
 			echo implode("\n", $evtOut);
59 59
 		}
60 60
 		?>
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		<?php
67 67
 		// invoke OnManagerTreeRender event
68 68
 		$evtOut = $modx->invokeEvent('OnManagerTreeRender', $modx->getDatabase()->escape($_REQUEST));
69
-		if(is_array($evtOut)) {
69
+		if (is_array($evtOut)) {
70 70
 			echo implode("\n", $evtOut);
71 71
 		}
72 72
 		?>
Please login to merge, or discard this patch.
manager/actions/files.dynamic.php 1 patch
Spacing   +59 added lines, -59 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
 if (!$modx->hasPermission('file_manager')) {
@@ -9,15 +9,15 @@  discard block
 block discarded – undo
9 9
 $newToken = makeToken();
10 10
 
11 11
 // settings
12
-$theme_image_path = $modx->config['site_manager_url'] . 'media/style/' . $modx->config['manager_theme'] . '/images/';
12
+$theme_image_path = $modx->config['site_manager_url'].'media/style/'.$modx->config['manager_theme'].'/images/';
13 13
 $excludes = array(
14 14
     '.',
15 15
     '..',
16 16
     '.svn'
17 17
 );
18
-$alias_suffix = (!empty($friendly_url_suffix)) ? ',' . ltrim($friendly_url_suffix, '.') : '';
19
-$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json,ini' . $alias_suffix);
20
-$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json,ini' . $alias_suffix);
18
+$alias_suffix = (!empty($friendly_url_suffix)) ? ','.ltrim($friendly_url_suffix, '.') : '';
19
+$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json,ini'.$alias_suffix);
20
+$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json,ini'.$alias_suffix);
21 21
 $viewablefiles = explode(',', 'jpg,gif,png,ico');
22 22
 
23 23
 $editablefiles = add_dot($editablefiles);
@@ -30,31 +30,31 @@  discard block
 block discarded – undo
30 30
 {
31 31
 */
32 32
 $protected_path[] = $modx->config['site_manager_path'];
33
-$protected_path[] = $modx->config['base_path'] . 'temp/backup';
34
-$protected_path[] = $modx->config['base_path'] . 'assets/backup';
33
+$protected_path[] = $modx->config['base_path'].'temp/backup';
34
+$protected_path[] = $modx->config['base_path'].'assets/backup';
35 35
 
36 36
 if (!$modx->hasPermission('save_plugin')) {
37
-    $protected_path[] = $modx->config['base_path'] . 'assets/plugins';
37
+    $protected_path[] = $modx->config['base_path'].'assets/plugins';
38 38
 }
39 39
 if (!$modx->hasPermission('save_snippet')) {
40
-    $protected_path[] = $modx->config['base_path'] . 'assets/snippets';
40
+    $protected_path[] = $modx->config['base_path'].'assets/snippets';
41 41
 }
42 42
 if (!$modx->hasPermission('save_template')) {
43
-    $protected_path[] = $modx->config['base_path'] . 'assets/templates';
43
+    $protected_path[] = $modx->config['base_path'].'assets/templates';
44 44
 }
45 45
 if (!$modx->hasPermission('save_module')) {
46
-    $protected_path[] = $modx->config['base_path'] . 'assets/modules';
46
+    $protected_path[] = $modx->config['base_path'].'assets/modules';
47 47
 }
48 48
 if (!$modx->hasPermission('empty_cache')) {
49
-    $protected_path[] = $modx->config['base_path'] . 'assets/cache';
49
+    $protected_path[] = $modx->config['base_path'].'assets/cache';
50 50
 }
51 51
 if (!$modx->hasPermission('import_static')) {
52
-    $protected_path[] = $modx->config['base_path'] . 'temp/import';
53
-    $protected_path[] = $modx->config['base_path'] . 'assets/import';
52
+    $protected_path[] = $modx->config['base_path'].'temp/import';
53
+    $protected_path[] = $modx->config['base_path'].'assets/import';
54 54
 }
55 55
 if (!$modx->hasPermission('export_static')) {
56
-    $protected_path[] = $modx->config['base_path'] . 'temp/export';
57
-    $protected_path[] = $modx->config['base_path'] . 'assets/export';
56
+    $protected_path[] = $modx->config['base_path'].'temp/export';
57
+    $protected_path[] = $modx->config['base_path'].'assets/export';
58 58
 }
59 59
 /*
60 60
 }
@@ -96,15 +96,15 @@  discard block
 block discarded – undo
96 96
 $rw = realpath('../');
97 97
 $webstart_path = str_replace('\\', '/', str_replace($rw, '', $rf));
98 98
 if (substr($webstart_path, 0, 1) == '/') {
99
-    $webstart_path = '..' . $webstart_path;
99
+    $webstart_path = '..'.$webstart_path;
100 100
 } else {
101
-    $webstart_path = '../' . $webstart_path;
101
+    $webstart_path = '../'.$webstart_path;
102 102
 }
103 103
 
104 104
 ?>
105 105
     <script type="text/javascript">
106 106
 
107
-        var current_path = '<?= $startpath;?>';
107
+        var current_path = '<?= $startpath; ?>';
108 108
 
109 109
         function viewfile (url)
110 110
         {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         function unzipFile (file)
141 141
         {
142 142
             if (confirmUnzip()) {
143
-                window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken;?>";
143
+                window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken; ?>";
144 144
                 return false;
145 145
             }
146 146
         }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         function deleteFolder (folder, status)
163 163
         {
164 164
             if (confirmDeleteFolder(status)) {
165
-                window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken;?>";
165
+                window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken; ?>";
166 166
                 return false;
167 167
             }
168 168
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         function deleteFile (file)
171 171
         {
172 172
             if (confirmDelete()) {
173
-                window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken;?>";
173
+                window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken; ?>";
174 174
                 return false;
175 175
             }
176 176
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         {
180 180
             var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file);
181 181
             if (newFilename !== null && newFilename !== file) {
182
-                window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>";
182
+                window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>";
183 183
             }
184 184
         }
185 185
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         {
188 188
             var newDirname = prompt("<?= $_lang["files_dynamic_new_folder_name"] ?>", dir);
189 189
             if (newDirname !== null && newDirname !== dir) {
190
-                window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken;?>";
190
+                window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken; ?>";
191 191
             }
192 192
         }
193 193
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         {
196 196
             var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file);
197 197
             if (newFilename !== null && newFilename !== file) {
198
-                window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>";
198
+                window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>";
199 199
             }
200 200
         }
201 201
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             <?php endif ?>
215 215
             <?php
216 216
             if (isset($_GET['mode']) && $_GET['mode'] !== 'drill') {
217
-                $href = 'a=31&path=' . urlencode($_REQUEST['path']);
217
+                $href = 'a=31&path='.urlencode($_REQUEST['path']);
218 218
             } else {
219 219
                 $href = 'a=2';
220 220
             }
@@ -224,12 +224,12 @@  discard block
 block discarded – undo
224 224
                 $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFolderName(this);"><i class="[+image+]"></i><span>[+subject+]</span></a>';
225 225
                 $ph['image'] = $_style['files_folder-open'];
226 226
                 $ph['subject'] = $_lang['add_folder'];
227
-                $ph['href'] = 'index.php?a=31&mode=newfolder&path=' . urlencode($startpath) . '&name=';
227
+                $ph['href'] = 'index.php?a=31&mode=newfolder&path='.urlencode($startpath).'&name=';
228 228
                 $_ = parsePlaceholder($tpl, $ph);
229 229
 
230
-                $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>' . $_lang['files.dynamic.php1'] . '</span></a>';
230
+                $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>'.$_lang['files.dynamic.php1'].'</span></a>';
231 231
                 $ph['image'] = $_style['files_page_html'];
232
-                $ph['href'] = 'index.php?a=31&mode=newfile&path=' . urlencode($startpath) . '&name=';
232
+                $ph['href'] = 'index.php?a=31&mode=newfile&path='.urlencode($startpath).'&name=';
233 233
                 $_ .= parsePlaceholder($tpl, $ph);
234 234
                 echo $_;
235 235
             }
@@ -259,12 +259,12 @@  discard block
 block discarded – undo
259 259
             $ph = array();
260 260
             $ph['style_path'] = $theme_image_path;
261 261
             // To Top Level with folder icon to the left
262
-            if ($startpath == $filemanager_path || $startpath . '/' == $filemanager_path) {
263
-                $ph['image'] = '' . $_style['files_top'] . '';
262
+            if ($startpath == $filemanager_path || $startpath.'/' == $filemanager_path) {
263
+                $ph['image'] = ''.$_style['files_top'].'';
264 264
                 $ph['subject'] = '<span>Top</span>';
265 265
             } else {
266
-                $ph['image'] = '' . $_style['files_top'] . '';
267
-                $ph['subject'] = '<a href="index.php?a=31&mode=drill&path=' . $filemanager_path . '">Top</a>/';
266
+                $ph['image'] = ''.$_style['files_top'].'';
267
+                $ph['subject'] = '<a href="index.php?a=31&mode=drill&path='.$filemanager_path.'">Top</a>/';
268 268
             }
269 269
 
270 270
             echo parsePlaceholder($tpl, $ph);
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
                     if (empty($v)) {
282 282
                         continue;
283 283
                     }
284
-                    $path .= rtrim($v, '/') . '/';
284
+                    $path .= rtrim($v, '/').'/';
285 285
                     if (1 < $count) {
286
-                        $href = 'index.php?a=31&mode=drill&path=' . urlencode($filemanager_path . $path);
287
-                        $pieces[$i] = '<a href="' . $href . '">' . trim($v, '/') . '</a>';
286
+                        $href = 'index.php?a=31&mode=drill&path='.urlencode($filemanager_path.$path);
287
+                        $pieces[$i] = '<a href="'.$href.'">'.trim($v, '/').'</a>';
288 288
                     } else {
289
-                        $pieces[$i] = '<span>' . trim($v, '/') . '</span>';
289
+                        $pieces[$i] = '<span>'.trim($v, '/').'</span>';
290 290
                     }
291 291
                     $count--;
292 292
                 }
@@ -299,16 +299,16 @@  discard block
 block discarded – undo
299 299
         </div>
300 300
         <?php
301 301
         // check to see user isn't trying to move below the document_root
302
-        if (substr(strtolower(str_replace('//', '/', $startpath . "/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path . '/'))) {
302
+        if (substr(strtolower(str_replace('//', '/', $startpath."/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path.'/'))) {
303 303
             $modx->webAlertAndQuit($_lang["files_access_denied"]);
304 304
         }
305 305
 
306 306
         // Unzip .zip files - by Raymond
307 307
         if ($enablefileunzip && $_REQUEST['mode'] == 'unzip' && is_writable($startpath)) {
308
-            if (!$err = unzip(realpath("{$startpath}/" . $_REQUEST['file']), realpath($startpath))) {
309
-                echo '<span class="warning"><b>' . $_lang['file_unzip_fail'] . ($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '') . '</b></span><br /><br />';
308
+            if (!$err = unzip(realpath("{$startpath}/".$_REQUEST['file']), realpath($startpath))) {
309
+                echo '<span class="warning"><b>'.$_lang['file_unzip_fail'].($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '').'</b></span><br /><br />';
310 310
             } else {
311
-                echo '<span class="success"><b>' . $_lang['file_unzip'] . '</b></span><br /><br />';
311
+                echo '<span class="success"><b>'.$_lang['file_unzip'].'</b></span><br /><br />';
312 312
             }
313 313
         }
314 314
         // End Unzip - Raymond
@@ -320,9 +320,9 @@  discard block
 block discarded – undo
320 320
             if ($_REQUEST['mode'] == 'deletefolder') {
321 321
                 $folder = $_REQUEST['folderpath'];
322 322
                 if (!$token_check || !@rrmdir($folder)) {
323
-                    echo '<span class="warning"><b>' . $_lang['file_folder_not_deleted'] . '</b></span><br /><br />';
323
+                    echo '<span class="warning"><b>'.$_lang['file_folder_not_deleted'].'</b></span><br /><br />';
324 324
                 } else {
325
-                    echo '<span class="success"><b>' . $_lang['file_folder_deleted'] . '</b></span><br /><br />';
325
+                    echo '<span class="success"><b>'.$_lang['file_folder_deleted'].'</b></span><br /><br />';
326 326
                 }
327 327
             }
328 328
 
@@ -333,10 +333,10 @@  discard block
 block discarded – undo
333 333
                 if (!mkdirs("{$startpath}/{$foldername}", 0777)) {
334 334
                     echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />';
335 335
                 } else {
336
-                    if (!@chmod($startpath . '/' . $foldername, $newfolderaccessmode)) {
337
-                        echo '<span class="warning"><b>' . $_lang['file_folder_chmod_error'] . '</b></span><br /><br />';
336
+                    if (!@chmod($startpath.'/'.$foldername, $newfolderaccessmode)) {
337
+                        echo '<span class="warning"><b>'.$_lang['file_folder_chmod_error'].'</b></span><br /><br />';
338 338
                     } else {
339
-                        echo '<span class="success"><b>' . $_lang['file_folder_created'] . '</b></span><br /><br />';
339
+                        echo '<span class="success"><b>'.$_lang['file_folder_created'].'</b></span><br /><br />';
340 340
                     }
341 341
                 }
342 342
                 umask($old_umask);
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
                 $filename = $modx->getDatabase()->escape($filename);
349 349
 
350 350
                 if (!checkExtension($filename)) {
351
-                    echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />';
351
+                    echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />';
352 352
                 } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $filename) !== 0) {
353 353
                     echo $_lang['files.dynamic.php3'];
354 354
                 } else {
@@ -370,11 +370,11 @@  discard block
 block discarded – undo
370 370
                 $newFilename = $modx->getDatabase()->escape($newFilename);
371 371
 
372 372
                 if (!checkExtension($newFilename)) {
373
-                    echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />';
373
+                    echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />';
374 374
                 } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) {
375 375
                     echo $_lang['files.dynamic.php3'];
376 376
                 } else {
377
-                    if (!copy($filename, MODX_BASE_PATH . $newFilename)) {
377
+                    if (!copy($filename, MODX_BASE_PATH.$newFilename)) {
378 378
                         echo $_lang['files.dynamic.php5'];
379 379
                     }
380 380
                     umask($old_umask);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
             // Rename folder here
384 384
             if ($_REQUEST['mode'] == 'renameFolder') {
385 385
                 $old_umask = umask(0);
386
-                $dirname = $_REQUEST['path'] . '/' . $_REQUEST['dirname'];
386
+                $dirname = $_REQUEST['path'].'/'.$_REQUEST['dirname'];
387 387
                 $dirname = $modx->getDatabase()->escape($dirname);
388 388
                 $newDirname = str_replace(array(
389 389
                     '..\\',
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
                 if (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newDirname) !== 0) {
397 397
                     echo $_lang['files.dynamic.php3'];
398
-                } else if (!rename($dirname, $_REQUEST['path'] . '/' . $newDirname)) {
398
+                } else if (!rename($dirname, $_REQUEST['path'].'/'.$newDirname)) {
399 399
                     echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />';
400 400
                 }
401 401
                 umask($old_umask);
@@ -415,11 +415,11 @@  discard block
 block discarded – undo
415 415
                 $newFilename = $modx->getDatabase()->escape($newFilename);
416 416
 
417 417
                 if (!checkExtension($newFilename)) {
418
-                    echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />';
418
+                    echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />';
419 419
                 } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) {
420 420
                     echo $_lang['files.dynamic.php3'];
421 421
                 } else {
422
-                    if (!rename($filename, $path . '/' . $newFilename)) {
422
+                    if (!rename($filename, $path.'/'.$newFilename)) {
423 423
                         echo $_lang['files.dynamic.php5'];
424 424
                     }
425 425
                     umask($old_umask);
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
                 ls($startpath);
453 453
                 echo "\n\n\n";
454 454
                 if ($folders == 0 && $files == 0) {
455
-                    echo '<tr><td colspan="4"><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> ' . $_lang['files_directory_is_empty'] . ' </span></td></tr>';
455
+                    echo '<tr><td colspan="4"><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> '.$_lang['files_directory_is_empty'].' </span></td></tr>';
456 456
                 }
457 457
                 ?>
458 458
             </table>
@@ -461,10 +461,10 @@  discard block
 block discarded – undo
461 461
         <div class="container">
462 462
             <p>
463 463
                 <?php
464
-                echo $_lang['files_directories'] . ': <b>' . $folders . '</b> ';
465
-                echo $_lang['files_files'] . ': <b>' . $files . '</b> ';
466
-                echo $_lang['files_data'] . ': <b><span dir="ltr">' . $modx->nicesize($filesizes) . '</span></b> ';
467
-                echo $_lang['files_dirwritable'] . ' <b>' . (is_writable($startpath) == 1 ? $_lang['yes'] . '.' : $_lang['no']) . '.</b>'
464
+                echo $_lang['files_directories'].': <b>'.$folders.'</b> ';
465
+                echo $_lang['files_files'].': <b>'.$files.'</b> ';
466
+                echo $_lang['files_data'].': <b><span dir="ltr">'.$modx->nicesize($filesizes).'</span></b> ';
467
+                echo $_lang['files_dirwritable'].' <b>'.(is_writable($startpath) == 1 ? $_lang['yes'].'.' : $_lang['no']).'.</b>'
468 468
                 ?>
469 469
             </p>
470 470
 
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
                 </form>
490 490
                 <?php
491 491
             } else {
492
-                echo "<p>" . $_lang['files_upload_inhibited_msg'] . "</p>";
492
+                echo "<p>".$_lang['files_upload_inhibited_msg']."</p>";
493 493
             }
494 494
             ?>
495 495
             <div id="imageviewer"></div>
Please login to merge, or discard this patch.
manager/actions/sysinfo.static.php 1 patch
Spacing   +14 added lines, -14 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
 if (!$modx->hasPermission('logs')) {
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 $collation = $modx->getDatabase()->getRow($res, 'num');
13 13
 
14 14
 $serverArr = array(
15
-    $_lang['modx_version'] => $modx->getVersionData('version') . ' ' . $newversiontext,
15
+    $_lang['modx_version'] => $modx->getVersionData('version').' '.$newversiontext,
16 16
     $_lang['release_date'] => $modx->getVersionData('release_date'),
17 17
     'PHP Version' => phpversion(),
18
-    'phpInfo()' => '<a class="text-underline" href="javascript:;" onclick="viewPHPInfo();return false;">' . $_lang['view'] . '</a>',
18
+    'phpInfo()' => '<a class="text-underline" href="javascript:;" onclick="viewPHPInfo();return false;">'.$_lang['view'].'</a>',
19 19
     $_lang['access_permissions'] => ($use_udperms == 1 ? $_lang['enabled'] : $_lang['disabled']),
20 20
     $_lang['servertime'] => strftime('%H:%M:%S', time()),
21 21
     $_lang['localtime'] => strftime('%H:%M:%S', time() + $server_offset_time),
22
-    $_lang['serveroffset'] => $server_offset_time / (60 * 60) . ' h',
22
+    $_lang['serveroffset'] => $server_offset_time / (60 * 60).' h',
23 23
     $_lang['database_name'] => trim($dbase, '`'),
24 24
     $_lang['database_server'] => $database_server,
25 25
     $_lang['database_version'] => $modx->getDatabase()->getVersion(),
@@ -95,33 +95,33 @@  discard block
 block discarded – undo
95 95
                     </thead>
96 96
                     <tbody>
97 97
                     <?php
98
-                    $sql = "SHOW TABLE STATUS FROM $dbase LIKE '" . $modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix']) . "%';";
98
+                    $sql = "SHOW TABLE STATUS FROM $dbase LIKE '".$modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix'])."%';";
99 99
                     $rs = $modx->getDatabase()->query($sql);
100 100
                     $i = 0;
101 101
                     while ($log_status = $modx->getDatabase()->getRow($rs)) {
102 102
                         ?>
103 103
                         <tr>
104 104
                             <td class="text-primary"><b><?= $log_status['Name'] ?></b></td>
105
-                            <td class="text-xs-center"><?= (!empty($log_status['Comment']) ? '<i class="' . $_style['actions_help'] . '" data-tooltip="' . $log_status['Comment'] . '"></i>' : '') ?></td>
105
+                            <td class="text-xs-center"><?= (!empty($log_status['Comment']) ? '<i class="'.$_style['actions_help'].'" data-tooltip="'.$log_status['Comment'].'"></i>' : '') ?></td>
106 106
                             <td class="text-xs-right"><?= $log_status['Rows'] ?></td>
107 107
 
108 108
                             <?php
109 109
                             $truncateable = array(
110
-                                $modx->getDatabase()->config['table_prefix'] . 'event_log',
111
-                                $modx->getDatabase()->config['table_prefix'] . 'manager_log',
110
+                                $modx->getDatabase()->config['table_prefix'].'event_log',
111
+                                $modx->getDatabase()->config['table_prefix'].'manager_log',
112 112
                             );
113 113
                             if ($modx->hasPermission('settings') && in_array($log_status['Name'], $truncateable)) {
114 114
                                 echo "<td class=\"text-xs-right\">";
115
-                                echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=" . $log_status['Name'] . "' title='" . $_lang['truncate_table'] . "'>" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</a>";
115
+                                echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=".$log_status['Name']."' title='".$_lang['truncate_table']."'>".$modx->nicesize($log_status['Data_length'] + $log_status['Data_free'])."</a>";
116 116
                                 echo "</td>";
117 117
                             } else {
118
-                                echo "<td class=\"text-xs-right\">" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</td>";
118
+                                echo "<td class=\"text-xs-right\">".$modx->nicesize($log_status['Data_length'] + $log_status['Data_free'])."</td>";
119 119
                             }
120 120
 
121 121
                             if ($modx->hasPermission('settings')) {
122
-                                echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=" . $log_status['Name'] . "' title='" . $_lang['optimize_table'] . "' ><span>" . $modx->nicesize($log_status['Data_free']) . "</span></a>" : "-") . "</td>";
122
+                                echo "<td class=\"text-xs-right\">".($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=".$log_status['Name']."' title='".$_lang['optimize_table']."' ><span>".$modx->nicesize($log_status['Data_free'])."</span></a>" : "-")."</td>";
123 123
                             } else {
124
-                                echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-") . "</td>";
124
+                                echo "<td class=\"text-xs-right\">".($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-")."</td>";
125 125
                             }
126 126
                             ?>
127 127
                             <td class="text-xs-right"><?= $modx->nicesize($log_status['Data_length'] - $log_status['Data_free']) ?></td>
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
                     <tr class="unstyled">
137 137
                         <td class="text-xs-right"><?= $_lang['database_table_totals'] ?></td>
138 138
                         <td colspan="3">&nbsp;</td>
139
-                        <td class="text-xs-right"><?= $totaloverhead > 0 ? "<b class=\"text-danger\">" . $modx->nicesize($totaloverhead) . "</b><br />(" . number_format($totaloverhead) . " B)" : "-" ?></td>
139
+                        <td class="text-xs-right"><?= $totaloverhead > 0 ? "<b class=\"text-danger\">".$modx->nicesize($totaloverhead)."</b><br />(".number_format($totaloverhead)." B)" : "-" ?></td>
140 140
                         <td colspan="2">&nbsp;</td>
141
-                        <td class="text-xs-right"><?= "<b>" . $modx->nicesize($total) . "</b><br />(" . number_format($total) . " B)" ?></td>
141
+                        <td class="text-xs-right"><?= "<b>".$modx->nicesize($total)."</b><br />(".number_format($total)." B)" ?></td>
142 142
                     </tr>
143 143
                     </tbody>
144 144
                 </table>
Please login to merge, or discard this patch.
manager/actions/mutate_tv_rank.dynamic.php 1 patch
Spacing   +4 added lines, -4 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
 if (!$modx->hasPermission('save_template')) {
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 $updateMsg = '';
16 16
 
17 17
 if (isset($_POST['listSubmitted'])) {
18
-    $updateMsg .= '<span class="text-success" id="updated">' . $_lang['sort_updated'] . '</span>';
18
+    $updateMsg .= '<span class="text-success" id="updated">'.$_lang['sort_updated'].'</span>';
19 19
     foreach ($_POST as $listName => $listValue) {
20 20
         if ($listName == 'listSubmitted' || $listName == 'reset') {
21 21
             continue;
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
     $sortableList = '<div class="clearfix"><ul id="sortlist" class="sortableList">';
41 41
     while ($row = $modx->getDatabase()->getRow($rs)) {
42 42
         $caption = $row['caption'] != '' ? $row['caption'] : $row['name'];
43
-        $sortableList .= '<li id="item_' . $row['id'] . '"><i class="fa fa-list-alt"></i> ' . $caption . ' <small class="protectedNode" style="float:right">[*' . $row['name'] . '*]</small></li>';
43
+        $sortableList .= '<li id="item_'.$row['id'].'"><i class="fa fa-list-alt"></i> '.$caption.' <small class="protectedNode" style="float:right">[*'.$row['name'].'*]</small></li>';
44 44
     }
45 45
     $sortableList .= '</ul></div>';
46 46
 } else {
47
-    $updateMsg = '<p class="text-danger">' . $_lang['tmplvars_novars'] . '</p>';
47
+    $updateMsg = '<p class="text-danger">'.$_lang['tmplvars_novars'].'</p>';
48 48
 }
49 49
 ?>
50 50
 
Please login to merge, or discard this patch.
manager/actions/bkmanager.static.php 1 patch
Spacing   +35 added lines, -35 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
 if (!$modx->hasPermission('bk_manager')) {
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
 $dbase = trim($dbase, '`');
10 10
 
11 11
 if (!isset($modx->config['snapshot_path'])) {
12
-    if (is_dir(MODX_BASE_PATH . 'temp/backup/')) {
13
-        $modx->config['snapshot_path'] = MODX_BASE_PATH . 'temp/backup/';
12
+    if (is_dir(MODX_BASE_PATH.'temp/backup/')) {
13
+        $modx->config['snapshot_path'] = MODX_BASE_PATH.'temp/backup/';
14 14
     } else {
15
-        $modx->config['snapshot_path'] = MODX_BASE_PATH . 'assets/backup/';
15
+        $modx->config['snapshot_path'] = MODX_BASE_PATH.'assets/backup/';
16 16
     }
17 17
 }
18 18
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 if ($mode == 'restore1') {
24 24
     if (isset($_POST['textarea']) && !empty($_POST['textarea'])) {
25 25
         $source = trim($_POST['textarea']);
26
-        $_SESSION['textarea'] = $source . "\n";
26
+        $_SESSION['textarea'] = $source."\n";
27 27
     } else {
28 28
         $source = file_get_contents($_FILES['sqlfile']['tmp_name']);
29 29
     }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     header('Location: index.php?r=9&a=93');
32 32
     exit;
33 33
 } elseif ($mode == 'restore2') {
34
-    $path = $modx->config['snapshot_path'] . $_POST['filename'];
34
+    $path = $modx->config['snapshot_path'].$_POST['filename'];
35 35
     if (file_exists($path)) {
36 36
         $source = file_get_contents($path);
37 37
         import_sql($source);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     if (!is_writable(rtrim($modx->config['snapshot_path'], '/'))) {
78 78
         $modx->webAlertAndQuit(parsePlaceholder($_lang["bkmgr_alert_mkdir"], array('snapshot_path' => $modx->config['snapshot_path'])));
79 79
     }
80
-    $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '" . $modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix']) . "%'";
80
+    $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '".$modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix'])."%'";
81 81
     $rs = $modx->getDatabase()->query($sql);
82 82
     $tables = $modx->getDatabase()->getColumn('Name', $rs);
83 83
     $today = date('Y-m-d_H-i-s');
@@ -109,18 +109,18 @@  discard block
 block discarded – undo
109 109
         $modx->webAlertAndQuit('Unable to Backup Database');
110 110
     }
111 111
 } else {
112
-    include_once MODX_MANAGER_PATH . "includes/header.inc.php";  // start normal header
112
+    include_once MODX_MANAGER_PATH."includes/header.inc.php"; // start normal header
113 113
 }
114 114
 
115 115
 if (isset($_SESSION['result_msg']) && $_SESSION['result_msg'] != '') {
116 116
     switch ($_SESSION['result_msg']) {
117 117
         case 'import_ok':
118
-            $ph['result_msg_import'] = '<div class="alert alert-success">' . $_lang["bkmgr_import_ok"] . '</div>';
119
-            $ph['result_msg_snapshot'] = '<div class="alert alert-success">' . $_lang["bkmgr_import_ok"] . '</div>';
118
+            $ph['result_msg_import'] = '<div class="alert alert-success">'.$_lang["bkmgr_import_ok"].'</div>';
119
+            $ph['result_msg_snapshot'] = '<div class="alert alert-success">'.$_lang["bkmgr_import_ok"].'</div>';
120 120
             break;
121 121
         case 'snapshot_ok':
122 122
             $ph['result_msg_import'] = '';
123
-            $ph['result_msg_snapshot'] = '<div class="alert alert-success">' . $_lang["bkmgr_snapshot_ok"] . '</div>';
123
+            $ph['result_msg_snapshot'] = '<div class="alert alert-success">'.$_lang["bkmgr_snapshot_ok"].'</div>';
124 124
             break;
125 125
     }
126 126
     $_SESSION['result_msg'] = '';
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                 f.style.display = 'none';
180 180
             }
181 181
         }
182
-        <?= (isset($_REQUEST['r']) ? " doRefresh(" . $_REQUEST['r'] . ");" : "") ?>
182
+        <?= (isset($_REQUEST['r']) ? " doRefresh(".$_REQUEST['r'].");" : "") ?>
183 183
 
184 184
     </script>
185 185
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                                 </thead>
224 224
                                 <tbody>
225 225
                                 <?php
226
-                                $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '" . $modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix']) . "%'";
226
+                                $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '".$modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix'])."%'";
227 227
                                 $rs = $modx->getDatabase()->query($sql);
228 228
                                 $i = 0;
229 229
                                 while ($db_status = $modx->getDatabase()->getRow($rs)) {
@@ -233,29 +233,29 @@  discard block
 block discarded – undo
233 233
                                         $table_string = '';
234 234
                                     }
235 235
 
236
-                                    echo '<tr>' . "\n" . '<td><label class="form-check form-check-label"><input type="checkbox" name="chk[]" class="form-check-input" value="' . $db_status['Name'] . '"' . (strstr($table_string, $db_status['Name']) === false ? '' : ' checked="checked"') . ' /><b class="text-primary">' . $db_status['Name'] . '</b></label></td>' . "\n";
237
-                                    echo '<td class="text-xs-center">' . (!empty($db_status['Comment']) ? '<i class="' . $_style['actions_help'] . '" data-tooltip="' . $db_status['Comment'] . '"></i>' : '') . '</td>' . "\n";
238
-                                    echo '<td class="text-xs-right">' . $db_status['Rows'] . '</td>' . "\n";
239
-                                    echo '<td class="text-xs-right">' . $db_status['Collation'] . '</td>' . "\n";
236
+                                    echo '<tr>'."\n".'<td><label class="form-check form-check-label"><input type="checkbox" name="chk[]" class="form-check-input" value="'.$db_status['Name'].'"'.(strstr($table_string, $db_status['Name']) === false ? '' : ' checked="checked"').' /><b class="text-primary">'.$db_status['Name'].'</b></label></td>'."\n";
237
+                                    echo '<td class="text-xs-center">'.(!empty($db_status['Comment']) ? '<i class="'.$_style['actions_help'].'" data-tooltip="'.$db_status['Comment'].'"></i>' : '').'</td>'."\n";
238
+                                    echo '<td class="text-xs-right">'.$db_status['Rows'].'</td>'."\n";
239
+                                    echo '<td class="text-xs-right">'.$db_status['Collation'].'</td>'."\n";
240 240
 
241 241
                                     // Enable record deletion for certain tables (TRUNCATE TABLE) if they're not already empty
242 242
                                     $truncateable = array(
243
-                                        $modx->getDatabase()->config['table_prefix'] . 'event_log',
244
-                                        $modx->getDatabase()->config['table_prefix'] . 'manager_log',
243
+                                        $modx->getDatabase()->config['table_prefix'].'event_log',
244
+                                        $modx->getDatabase()->config['table_prefix'].'manager_log',
245 245
                                     );
246 246
                                     if ($modx->hasPermission('settings') && in_array($db_status['Name'], $truncateable) && $db_status['Rows'] > 0) {
247
-                                        echo '<td class="text-xs-right"><a class="text-danger" href="index.php?a=54&mode=' . $action . '&u=' . $db_status['Name'] . '" title="' . $_lang['truncate_table'] . '">' . $modx->nicesize($db_status['Data_length'] + $db_status['Data_free']) . '</a>' . '</td>' . "\n";
247
+                                        echo '<td class="text-xs-right"><a class="text-danger" href="index.php?a=54&mode='.$action.'&u='.$db_status['Name'].'" title="'.$_lang['truncate_table'].'">'.$modx->nicesize($db_status['Data_length'] + $db_status['Data_free']).'</a>'.'</td>'."\n";
248 248
                                     } else {
249
-                                        echo '<td class="text-xs-right">' . $modx->nicesize($db_status['Data_length'] + $db_status['Data_free']) . '</td>' . "\n";
249
+                                        echo '<td class="text-xs-right">'.$modx->nicesize($db_status['Data_length'] + $db_status['Data_free']).'</td>'."\n";
250 250
                                     }
251 251
 
252 252
                                     if ($modx->hasPermission('settings')) {
253
-                                        echo '<td class="text-xs-right">' . ($db_status['Data_free'] > 0 ? '<a class="text-danger" href="index.php?a=54&mode=' . $action . '&t=' . $db_status['Name'] . '" title="' . $_lang['optimize_table'] . '">' . $modx->nicesize($db_status['Data_free']) . '</a>' : '-') . '</td>' . "\n";
253
+                                        echo '<td class="text-xs-right">'.($db_status['Data_free'] > 0 ? '<a class="text-danger" href="index.php?a=54&mode='.$action.'&t='.$db_status['Name'].'" title="'.$_lang['optimize_table'].'">'.$modx->nicesize($db_status['Data_free']).'</a>' : '-').'</td>'."\n";
254 254
                                     } else {
255
-                                        echo '<td class="text-xs-right">' . ($db_status['Data_free'] > 0 ? $modx->nicesize($db_status['Data_free']) : '-') . '</td>' . "\n";
255
+                                        echo '<td class="text-xs-right">'.($db_status['Data_free'] > 0 ? $modx->nicesize($db_status['Data_free']) : '-').'</td>'."\n";
256 256
                                     }
257 257
 
258
-                                    echo '<td class="text-xs-right">' . $modx->nicesize($db_status['Data_length'] - $db_status['Data_free']) . '</td>' . "\n" . '<td class="text-xs-right">' . $modx->nicesize($db_status['Index_length']) . '</td>' . "\n" . '<td class="text-xs-right">' . $modx->nicesize($db_status['Index_length'] + $db_status['Data_length'] + $db_status['Data_free']) . '</td>' . "\n" . "</tr>";
258
+                                    echo '<td class="text-xs-right">'.$modx->nicesize($db_status['Data_length'] - $db_status['Data_free']).'</td>'."\n".'<td class="text-xs-right">'.$modx->nicesize($db_status['Index_length']).'</td>'."\n".'<td class="text-xs-right">'.$modx->nicesize($db_status['Index_length'] + $db_status['Data_length'] + $db_status['Data_free']).'</td>'."\n"."</tr>";
259 259
 
260 260
                                     $total = $total + $db_status['Index_length'] + $db_status['Data_length'];
261 261
                                     $totaloverhead = $totaloverhead + $db_status['Data_free'];
@@ -266,9 +266,9 @@  discard block
 block discarded – undo
266 266
                                 <tr>
267 267
                                     <td class="text-xs-right"><?= $_lang['database_table_totals'] ?></td>
268 268
                                     <td colspan="4">&nbsp;</td>
269
-                                    <td class="text-xs-right"><?= $totaloverhead > 0 ? '<b class="text-danger">' . $modx->nicesize($totaloverhead) . '</b><br />(' . number_format($totaloverhead) . ' B)' : '-' ?></td>
269
+                                    <td class="text-xs-right"><?= $totaloverhead > 0 ? '<b class="text-danger">'.$modx->nicesize($totaloverhead).'</b><br />('.number_format($totaloverhead).' B)' : '-' ?></td>
270 270
                                     <td colspan="2">&nbsp;</td>
271
-                                    <td class="text-xs-right"><?= "<b>" . $modx->nicesize($total) . "</b><br />(" . number_format($total) . " B)" ?></td>
271
+                                    <td class="text-xs-right"><?= "<b>".$modx->nicesize($total)."</b><br />(".number_format($total)." B)" ?></td>
272 272
                                 </tr>
273 273
                                 </tfoot>
274 274
                             </table>
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
                             foreach ($last_result['0'] as $k => $v) {
320 320
                                 $title[] = $k;
321 321
                             }
322
-                            $result = '<thead><tr><th>' . implode('</th><th>', $title) . '</th></tr></thead>';
322
+                            $result = '<thead><tr><th>'.implode('</th><th>', $title).'</th></tr></thead>';
323 323
                             $result .= '<tbody>';
324 324
                             foreach ($last_result as $row) {
325 325
                                 $result_value = array();
@@ -327,11 +327,11 @@  discard block
 block discarded – undo
327 327
                                     foreach ($row as $k => $v) {
328 328
                                         $result_value[] = $v;
329 329
                                     }
330
-                                    $result .= '<tr><td>' . implode('</td><td>', $result_value) . '</td></tr>';
330
+                                    $result .= '<tr><td>'.implode('</td><td>', $result_value).'</td></tr>';
331 331
                                 }
332 332
                             }
333 333
                             $result .= '</tbody>';
334
-                            $result = '<table class="table data">' . $result . '</table>';
334
+                            $result = '<table class="table data">'.$result.'</table>';
335 335
                         }
336 336
                     }
337 337
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
                                         while ($count < 11) {
434 434
                                             $line = fgets($file);
435 435
                                             foreach ($detailFields as $label) {
436
-                                                $fileLabel = '# ' . $label;
436
+                                                $fileLabel = '# '.$label;
437 437
                                                 if (strpos($line, $fileLabel) !== false) {
438 438
                                                     $details[$label] = htmlentities(trim(str_replace(array(
439 439
                                                         $fileLabel,
@@ -446,10 +446,10 @@  discard block
 block discarded – undo
446 446
                                         };
447 447
                                         fclose($file);
448 448
 
449
-                                        $tooltip = "Generation Time: " . $details["Generation Time"] . "\n";
450
-                                        $tooltip .= "Server version: " . $details["Server version"] . "\n";
451
-                                        $tooltip .= "PHP Version: " . $details["PHP Version"] . "\n";
452
-                                        $tooltip .= "Host: " . $details["Host"] . "\n";
449
+                                        $tooltip = "Generation Time: ".$details["Generation Time"]."\n";
450
+                                        $tooltip .= "Server version: ".$details["Server version"]."\n";
451
+                                        $tooltip .= "PHP Version: ".$details["PHP Version"]."\n";
452
+                                        $tooltip .= "Host: ".$details["Host"]."\n";
453 453
                                         ?>
454 454
                                         <tr>
455 455
                                             <td><?= $filename ?></td>
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 <?php
482 482
 
483 483
 if (is_numeric($_GET['tab'])) {
484
-    echo '<script type="text/javascript">tpDBM.setSelectedIndex( ' . $_GET['tab'] . ' );</script>';
484
+    echo '<script type="text/javascript">tpDBM.setSelectedIndex( '.$_GET['tab'].' );</script>';
485 485
 }
486 486
 
487 487
 include_once "footer.inc.php"; // send footer
Please login to merge, or discard this patch.