Completed
Push — develop ( 6a553b...48041c )
by Agel_Nash
06:37
created
manager/captcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 $modx->getSettings();
8 8
 
9 9
 $modx->documentMethod = 'id';
10
-$modx->documentIdentifier = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 1;
10
+$modx->documentIdentifier = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 1;
11 11
 $modx->documentObject = $modx->getDocumentObject('id', $modx->documentIdentifier);
12 12
 
13 13
 $modx->invokeEvent('OnWebPageInit');
Please login to merge, or discard this patch.
manager/includes/functions/actions/import.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@
 block discarded – undo
357 357
 if(!function_exists('getFileContent')) {
358 358
     /**
359 359
      * @param string $filepath
360
-     * @return bool|string
360
+     * @return null|string
361 361
      */
362 362
     function getFileContent($filepath)
363 363
     {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@
 block discarded – undo
114 114
                 $field['menuindex'] = 1;
115 115
                 $find = false;
116 116
                 foreach (array(
117
-                             'index.html',
118
-                             'index.htm'
119
-                         ) as $filename) {
117
+                                'index.html',
118
+                                'index.htm'
119
+                            ) as $filename) {
120 120
                     $filepath = $filedir . $alias . '/' . $filename;
121 121
                     if ($find === false && file_exists($filepath)) {
122 122
                         $file = getFileContent($filepath);
Please login to merge, or discard this 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/actions/help/01About_EVO.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 $logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">';
6 6
 $downloadLinks = array(
7
-	0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'),
8
-	1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
-	2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
-	3=>array('title'=>$_lang["extras"],'link'=>array(
11
-		'http://extras.evolution-cms.com/',
12
-		'https://github.com/extras-evolution'
13
-	)),
7
+    0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'),
8
+    1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
+    2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
+    3=>array('title'=>$_lang["extras"],'link'=>array(
11
+        'http://extras.evolution-cms.com/',
12
+        'https://github.com/extras-evolution'
13
+    )),
14 14
 );
15 15
 
16 16
 $translationLinks = array(
17
-	0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
-	1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'),
17
+    0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
+    1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'),
19 19
 );
20 20
 
21 21
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 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
-$logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">';
5
+$logo = '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">';
6 6
 $downloadLinks = array(
7
-	0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'),
8
-	1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
-	2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
-	3=>array('title'=>$_lang["extras"],'link'=>array(
7
+	0=>array('title'=>$_lang["information"], 'link'=>'https://evo.im/'),
8
+	1=>array('title'=>$_lang["download"], 'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
+	2=>array('title'=>$_lang["previous_releases"], 'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
+	3=>array('title'=>$_lang["extras"], 'link'=>array(
11 11
 		'http://extras.evolution-cms.com/',
12 12
 		'https://github.com/extras-evolution'
13 13
 	)),
14 14
 );
15 15
 
16 16
 $translationLinks = array(
17
-	0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
-	1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'),
17
+	0=>array('title'=>'Evolution CMS', 'link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
+	1=>array('title'=>$_lang["extras"], 'link'=>'https://www.transifex.com/evolutioncms/extras/'),
19 19
 );
20 20
 
21 21
 
Please login to merge, or discard this patch.
manager/actions/import_site.static.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     <div class="container container-body">
45 45
         <?php
46 46
         if (!isset($_POST['import'])) {
47
-            echo "<div class=\"element-edit-message\">" . $_lang['import_site_message'] . "</div>";
47
+            echo "<div class=\"element-edit-message\">".$_lang['import_site_message']."</div>";
48 48
             ?>
49 49
             <form action="index.php" method="post" name="importFrm">
50 50
                 <input type="hidden" name="import" value="import"/>
Please login to merge, or discard this patch.
manager/actions/bkmanager.static.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -491,4 +491,6 @@
 block discarded – undo
491 491
 /**
492 492
  * @deprecated use EvolutionCMS\Support\MysqlDumper
493 493
  */
494
-class Mysqldumper extends EvolutionCMS\Support\MysqlDumper{}
494
+class Mysqldumper extends EvolutionCMS\Support\MysqlDumper
495
+{
496
+}
Please login to merge, or discard this 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.
manager/actions/resources/functions.inc.php 2 patches
Spacing   +49 added lines, -49 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
 
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 $tpl = array(
12
-    'viewForm' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_viewForm.tpl'),
13
-    'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'),
14
-    'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'),
15
-    'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'),
16
-    'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl')
12
+    'viewForm' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_viewForm.tpl'),
13
+    'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'),
14
+    'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'),
15
+    'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'),
16
+    'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl')
17 17
 );
18 18
 
19 19
 /**
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @param array $ph
22 22
  * @return string
23 23
  */
24
-function parsePh($tpl, $ph) {
24
+function parsePh($tpl, $ph){
25 25
     $modx = evolutionCMS(); global $_lang;
26 26
     $tpl = $modx->parseText($tpl, $_lang, '[%', '%]');
27 27
     return $modx->parseText($tpl, $ph);
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
  * @param string|int $cssId
32 32
  * @return string
33 33
  */
34
-function renderViewSwitchButtons($cssId) {
34
+function renderViewSwitchButtons($cssId){
35 35
     $modx = evolutionCMS(); global $_lang, $tpl;
36 36
 
37 37
     return parsePh($tpl['viewForm'], array(
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
  * @param mgrResources $resources
45 45
  * @return string
46 46
  */
47
-function createResourceList($resourceTable, $resources) {
47
+function createResourceList($resourceTable, $resources){
48 48
     $modx = evolutionCMS(); global $_lang, $_style, $modx_textdir, $tpl;
49 49
 
50 50
     $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false;
51 51
 
52
-    if( ! is_array($items) || empty($items)) {
52
+    if (!is_array($items) || empty($items)) {
53 53
         return $_lang['no_results'];
54 54
     }
55 55
 
56 56
     // Prepare elements- and categories-list
57 57
     $elements = array();
58 58
     $categories = array();
59
-    foreach($items as $row) {
59
+    foreach ($items as $row) {
60 60
         $catid = $row['catid'] ? $row['catid'] : 0;
61 61
         $categories[$catid] = array('name' => stripslashes($row['category']));
62 62
         $elements[$catid][] = prepareElementRowPh($row, $resourceTable, $resources);
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
 
65 65
     // Now render categories / panel-collapse
66 66
     $panelGroup = '';
67
-    foreach($elements as $catid => $elList) {
67
+    foreach ($elements as $catid => $elList) {
68 68
         // Add panel-heading / category-collapse to output
69 69
         $panelGroup .= parsePh($tpl['panelHeading'], array(
70 70
             'tab' => $resourceTable,
71 71
             'category' => $categories[$catid]['name'],
72
-            'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '',
72
+            'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '',
73 73
             'catid' => $catid,
74 74
         ));
75 75
 
76 76
         // Prepare content for panel-collapse
77 77
         $panelCollapse = '';
78
-        foreach($elList as $el) {
78
+        foreach ($elList as $el) {
79 79
             $panelCollapse .= parsePh($tpl['elementsRow'], $el);
80 80
         }
81 81
 
@@ -97,30 +97,30 @@  discard block
 block discarded – undo
97 97
  * @param mgrResources $resources
98 98
  * @return string
99 99
  */
100
-function createCombinedView($resources) {
100
+function createCombinedView($resources){
101 101
     $modx = evolutionCMS(); global $_lang, $_style, $modx_textdir;
102 102
 
103 103
     $itemsPerCategory = isset($resources->itemsPerCategory) ? $resources->itemsPerCategory : false;
104 104
     $types = isset($resources->types) ? $resources->types : false;
105 105
     $categories = isset($resources->categories) ? $resources->categories : false;
106 106
 
107
-    if(!$itemsPerCategory) {
107
+    if (!$itemsPerCategory) {
108 108
         return $_lang['no_results'];
109 109
     }
110 110
 
111 111
     $tpl = array(
112
-        'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'),
113
-        'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'),
114
-        'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'),
115
-        'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl'),
112
+        'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'),
113
+        'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'),
114
+        'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'),
115
+        'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl'),
116 116
     );
117 117
 
118 118
     // Easily loop through $itemsPerCategory-Array
119 119
     $panelGroup = '';
120
-    foreach($categories as $catid => $category) {
120
+    foreach ($categories as $catid => $category) {
121 121
         // Prepare collapse content / elements-list
122 122
         $panelCollapse = '';
123
-        foreach($itemsPerCategory[$catid] as $el) {
123
+        foreach ($itemsPerCategory[$catid] as $el) {
124 124
             $resourceTable = $el['type'];
125 125
             $ph = prepareElementRowPh($el, $resourceTable, $resources);
126 126
             $panelCollapse .= parsePh($tpl['elementsRow'], $ph);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $panelGroup .= parsePh($tpl['panelHeading'], array(
131 131
             'tab' => 'categories_list',
132 132
             'category' => $categories[$catid],
133
-            'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '',
133
+            'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '',
134 134
             'catid' => $catid,
135 135
         ));
136 136
 
@@ -154,14 +154,14 @@  discard block
 block discarded – undo
154 154
  * @param mgrResources $resources
155 155
  * @return array
156 156
  */
157
-function prepareElementRowPh($row, $resourceTable, $resources) {
157
+function prepareElementRowPh($row, $resourceTable, $resources){
158 158
     $modx = evolutionCMS(); global $modx_textdir, $_style, $_lang;
159 159
 
160 160
     $types = isset($resources->types[$resourceTable]) ? $resources->types[$resourceTable] : false;
161 161
 
162 162
     $_lang["confirm_delete"] = $_lang["delete"];
163 163
 
164
-    switch($resourceTable){
164
+    switch ($resourceTable) {
165 165
         case 'site_templates':
166 166
             $class = $row['selectable'] ? '' : 'disabledPlugin';
167 167
             $lockElementType = 1;
@@ -198,65 +198,65 @@  discard block
 block discarded – undo
198 198
     // Prepare displaying user-locks
199 199
     $lockedByUser = '';
200 200
     $rowLock = $modx->elementIsLocked($lockElementType, $row['id'], true);
201
-    if($rowLock && $modx->hasPermission('display_locks')) {
202
-        if($rowLock['sid'] == $modx->sid) {
201
+    if ($rowLock && $modx->hasPermission('display_locks')) {
202
+        if ($rowLock['sid'] == $modx->sid) {
203 203
             $title = $modx->parseText($_lang["lock_element_editing"], array(
204
-                'element_type' => $_lang["lock_element_type_" . $lockElementType],
204
+                'element_type' => $_lang["lock_element_type_".$lockElementType],
205 205
                 'lasthit_df' => $rowLock['lasthit_df']
206 206
             ));
207
-            $lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span>&nbsp;';
207
+            $lockedByUser = '<span title="'.$title.'" class="editResource" style="cursor:context-menu;">'.$_style['tree_preview_resource'].'</span>&nbsp;';
208 208
         } else {
209 209
             $title = $modx->parseText($_lang["lock_element_locked_by"], array(
210
-                'element_type' => $_lang["lock_element_type_" . $lockElementType],
210
+                'element_type' => $_lang["lock_element_type_".$lockElementType],
211 211
                 'username' => $rowLock['username'],
212 212
                 'lasthit_df' => $rowLock['lasthit_df']
213 213
             ));
214
-            if($modx->hasPermission('remove_locks')) {
215
-                $lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>';
214
+            if ($modx->hasPermission('remove_locks')) {
215
+                $lockedByUser = '<a href="javascript:;" onclick="unlockElement('.$lockElementType.', '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource"><i class="'.$_style['icons_secured'].'"></i></a>';
216 216
             } else {
217
-                $lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>';
217
+                $lockedByUser = '<span title="'.$title.'" class="lockedResource" style="cursor:context-menu;"><i class="'.$_style['icons_secured'].'"></i></span>';
218 218
             }
219 219
         }
220 220
     }
221
-    if($lockedByUser) {
222
-        $lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>';
221
+    if ($lockedByUser) {
222
+        $lockedByUser = '<div class="lockCell">'.$lockedByUser.'</div>';
223 223
     }
224 224
 
225 225
     // Caption
226
-    if($resourceTable == 'site_tmplvars') {
227
-        $caption = !empty($row['description']) ? ' ' . $row['caption'] . ' &nbsp; <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption'];
226
+    if ($resourceTable == 'site_tmplvars') {
227
+        $caption = !empty($row['description']) ? ' '.$row['caption'].' &nbsp; <small>('.$row['description'].')</small>' : ' '.$row['caption'];
228 228
     } else {
229
-        $caption = !empty($row['description']) ? ' ' . $row['description'] : '';
229
+        $caption = !empty($row['description']) ? ' '.$row['description'] : '';
230 230
     }
231 231
 
232 232
     // Special marks
233 233
     $tplInfo = array();
234
-    if($row['locked']) {
234
+    if ($row['locked']) {
235 235
         $tplInfo[] = $_lang['locked'];
236 236
     }
237
-    if($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') {
237
+    if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') {
238 238
         $tplInfo[] = $_lang['defaulttemplate_title'];
239 239
     }
240
-    $marks = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : '';
240
+    $marks = !empty($tplInfo) ? ' <em>('.implode(', ', $tplInfo).')</em>' : '';
241 241
 
242 242
     /* row buttons */
243 243
     $buttons = '';
244
-    if($modx->hasPermission($types['actions']['edit'][1])) {
245
-        $buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&amp;id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>';
244
+    if ($modx->hasPermission($types['actions']['edit'][1])) {
245
+        $buttons .= '<li><a title="'.$_lang["edit_resource"].'" href="index.php?a='.$types['actions']['edit'][0].'&amp;id='.$row['id'].'"><i class="fa fa-edit fa-fw"></i></a></li>';
246 246
     }
247
-    if($modx->hasPermission($types['actions']['duplicate'][1])) {
248
-        $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&amp;id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>';
247
+    if ($modx->hasPermission($types['actions']['duplicate'][1])) {
248
+        $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_duplicate_record"].'\')" title="'.$_lang["resource_duplicate"].'" href="index.php?a='.$types['actions']['duplicate'][0].'&amp;id='.$row['id'].'"><i class="fa fa-clone fa-fw"></i></a></li>';
249 249
     }
250
-    if($modx->hasPermission($types['actions']['remove'][1])) {
251
-        $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&amp;id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>';
250
+    if ($modx->hasPermission($types['actions']['remove'][1])) {
251
+        $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_delete"].'\')" title="'.$_lang["delete"].'" href="index.php?a='.$types['actions']['remove'][0].'&amp;id='.$row['id'].'"><i class="fa fa-trash fa-fw"></i></a></li>';
252 252
     }
253
-    $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : '';
253
+    $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">'.$buttons.'</ul></div>' : '';
254 254
 
255 255
     $catid = $row['catid'] ? $row['catid'] : 0;
256 256
 
257 257
     // Placeholders for elements-row
258 258
     return array(
259
-        'class' => $class ? ' class="' . $class . '"' : '',
259
+        'class' => $class ? ' class="'.$class.'"' : '',
260 260
         'lockedByUser' => $lockedByUser,
261 261
         'name' => $row['name'],
262 262
         'caption' => $caption,
Please login to merge, or discard this patch.
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
  * @param array $ph
22 22
  * @return string
23 23
  */
24
-function parsePh($tpl, $ph) {
24
+function parsePh($tpl, $ph)
25
+{
25 26
     $modx = evolutionCMS(); global $_lang;
26 27
     $tpl = $modx->parseText($tpl, $_lang, '[%', '%]');
27 28
     return $modx->parseText($tpl, $ph);
@@ -31,7 +32,8 @@  discard block
 block discarded – undo
31 32
  * @param string|int $cssId
32 33
  * @return string
33 34
  */
34
-function renderViewSwitchButtons($cssId) {
35
+function renderViewSwitchButtons($cssId)
36
+{
35 37
     $modx = evolutionCMS(); global $_lang, $tpl;
36 38
 
37 39
     return parsePh($tpl['viewForm'], array(
@@ -44,7 +46,8 @@  discard block
 block discarded – undo
44 46
  * @param mgrResources $resources
45 47
  * @return string
46 48
  */
47
-function createResourceList($resourceTable, $resources) {
49
+function createResourceList($resourceTable, $resources)
50
+{
48 51
     $modx = evolutionCMS(); global $_lang, $_style, $modx_textdir, $tpl;
49 52
 
50 53
     $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false;
@@ -97,7 +100,8 @@  discard block
 block discarded – undo
97 100
  * @param mgrResources $resources
98 101
  * @return string
99 102
  */
100
-function createCombinedView($resources) {
103
+function createCombinedView($resources)
104
+{
101 105
     $modx = evolutionCMS(); global $_lang, $_style, $modx_textdir;
102 106
 
103 107
     $itemsPerCategory = isset($resources->itemsPerCategory) ? $resources->itemsPerCategory : false;
@@ -154,14 +158,15 @@  discard block
 block discarded – undo
154 158
  * @param mgrResources $resources
155 159
  * @return array
156 160
  */
157
-function prepareElementRowPh($row, $resourceTable, $resources) {
161
+function prepareElementRowPh($row, $resourceTable, $resources)
162
+{
158 163
     $modx = evolutionCMS(); global $modx_textdir, $_style, $_lang;
159 164
 
160 165
     $types = isset($resources->types[$resourceTable]) ? $resources->types[$resourceTable] : false;
161 166
 
162 167
     $_lang["confirm_delete"] = $_lang["delete"];
163 168
 
164
-    switch($resourceTable){
169
+    switch($resourceTable) {
165 170
         case 'site_templates':
166 171
             $class = $row['selectable'] ? '' : 'disabledPlugin';
167 172
             $lockElementType = 1;
Please login to merge, or discard this patch.
manager/includes/src/Interfaces/ManagerThemeInterface.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,5 @@
 block discarded – undo
1 1
 <?php namespace EvolutionCMS\Interfaces;
2 2
 
3
-interface ManagerThemeInterface{}
3
+interface ManagerThemeInterface
4
+{
5
+}
Please login to merge, or discard this patch.
manager/includes/functions/actions/help.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!function_exists('createList')) {
2
+if (!function_exists('createList')) {
3 3
     /**
4 4
      * @param string $sectionHeader
5 5
      * @param array $linkArr
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
      */
8 8
     function createList($sectionHeader, $linkArr)
9 9
     {
10
-        $output = '<div class="sectionHeader">' . $sectionHeader . '</div><div class="sectionBody">' . "\n";
11
-        $output .= '<table width="500"  border="0" cellspacing="0" cellpadding="0">' . "\n";
10
+        $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n";
11
+        $output .= '<table width="500"  border="0" cellspacing="0" cellpadding="0">'."\n";
12 12
         $links = '';
13 13
         foreach ($linkArr as $row) {
14 14
             if (!is_array($row['link'])) {
@@ -16,16 +16,16 @@  discard block
 block discarded – undo
16 16
             }
17 17
             foreach ($row['link'] as $link) {
18 18
                 $links .= $links != '' ? '<br/>' : '';
19
-                $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>';
19
+                $links .= '<a href="'.$link.'" target="_blank">'.$link.'</a>';
20 20
             }
21 21
             $output .= '
22 22
 		<tr>
23
-			<td align="left"><strong>' . $row["title"] . '</strong></td>
24
-			<td align="left">' . $links . '</td>
23
+			<td align="left"><strong>' . $row["title"].'</strong></td>
24
+			<td align="left">' . $links.'</td>
25 25
 		</tr>';
26 26
             $links = '';
27 27
         }
28
-        $output .= '</table></div>' . "\n";
28
+        $output .= '</table></div>'."\n";
29 29
 
30 30
         return $output;
31 31
     }
Please login to merge, or discard this patch.
manager/includes/functions/actions/mutate_plugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
16 16
     {
17 17
         echo '<div class="row form-row">
18 18
                 <div class="col-sm-6 col-md-4 col-lg-3">' .
19
-                    implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames) .
20
-                '</div>' .
19
+                    implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames).
20
+                '</div>'.
21 21
         '</div>';
22 22
 
23 23
         $evtnames = array();
Please login to merge, or discard this patch.