Completed
Push — develop ( 80f130...524d8a )
by Maxim
08:25
created
manager/includes/categories.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     $newCat = $modx->getDatabase()->escape($newCat);
35 35
     $cats = $modx->getDatabase()->select('id', $modx->getDatabase()->getFullTableName('categories'), "category='{$newCat}'");
36 36
     if ($cat = $modx->getDatabase()->getValue($cats)) {
37
-        return (int)$cat;
37
+        return (int) $cat;
38 38
     }
39 39
 
40 40
     return 0;
Please login to merge, or discard this patch.
manager/includes/src/Database.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $pre = null,
34 34
         $charset = '',
35 35
         $connection_method = 'SET CHARACTER SET'
36
-    ) {
36
+    ){
37 37
         $this->config['host'] = $host ? $host : $GLOBALS['database_server'];
38 38
         $this->config['dbase'] = $dbase ? $dbase : $GLOBALS['dbase'];
39 39
         $this->config['user'] = $uid ? $uid : $GLOBALS['database_user'];
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                         $ua = $modx->getPhpCompat()->htmlspecialchars($_SERVER['HTTP_USER_AGENT']);
83 83
                         $referer = $modx->getPhpCompat()->htmlspecialchars($_SERVER['HTTP_REFERER']);
84 84
                         $modx->sendmail(array(
85
-                            'subject' => 'Missing to create the database connection! from ' . $modx->getPhpCompat()->entities($modx->config['site_name']),
85
+                            'subject' => 'Missing to create the database connection! from '.$modx->getPhpCompat()->entities($modx->config['site_name']),
86 86
                             'body'    => "{$logtitle}\n{$request_uri}\n{$ua}\n{$referer}",
87 87
                             'type'    => 'text'
88 88
                         ));
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
             $tend = $modx->getMicroTime();
98 98
             $totaltime = $tend - $tstart;
99 99
             if ($modx->dumpSQL) {
100
-                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Database connection</legend>" . sprintf("Database connection was created in %2.4f s",
101
-                        $totaltime) . "</fieldset><br />";
100
+                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Database connection</legend>".sprintf("Database connection was created in %2.4f s",
101
+                        $totaltime)."</fieldset><br />";
102 102
             }
103 103
             $this->conn->set_charset($this->getConfig('charset'));
104 104
             $this->isConnected = true;
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if (1000 < $safeCount) {
132 132
             exit("Too many loops '{$safeCount}'");
133 133
         }
134
-        if ( ! ($this->conn instanceof mysqli)) {
134
+        if (!($this->conn instanceof mysqli)) {
135 135
             $this->connect();
136 136
         }
137 137
         if (is_array($s)) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     public function query($sql, $watchError = true)
158 158
     {
159 159
         $modx = evolutionCMS();
160
-        if ( ! ($this->conn instanceof mysqli)) {
160
+        if (!($this->conn instanceof mysqli)) {
161 161
             $this->connect();
162 162
         }
163 163
         $tStart = $modx->getMicroTime();
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                 case 1091:
178 178
                     break;
179 179
                 default:
180
-                    $modx->messageQuit('Execution of a query to the database failed - ' . $this->getLastError(), $sql);
180
+                    $modx->messageQuit('Execution of a query to the database failed - '.$this->getLastError(), $sql);
181 181
             }
182 182
         } else {
183 183
             $tend = $modx->getMicroTime();
@@ -191,24 +191,24 @@  discard block
 block discarded – undo
191 191
                     $debug_path[] = $line['function'];
192 192
                 }
193 193
                 $debug_path = implode(' > ', array_reverse($debug_path));
194
-                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Query " . ($modx->executedQueries + 1) . " - " . sprintf("%2.2f ms",
195
-                        $totalTime * 1000) . "</legend>";
196
-                $modx->queryCode .= $sql . '<br><br>';
194
+                $modx->queryCode .= "<fieldset style='text-align:left'><legend>Query ".($modx->executedQueries + 1)." - ".sprintf("%2.2f ms",
195
+                        $totalTime * 1000)."</legend>";
196
+                $modx->queryCode .= $sql.'<br><br>';
197 197
                 if ($modx->event->name) {
198
-                    $modx->queryCode .= 'Current Event  => ' . $modx->event->name . '<br>';
198
+                    $modx->queryCode .= 'Current Event  => '.$modx->event->name.'<br>';
199 199
                 }
200 200
                 if ($modx->event->activePlugin) {
201
-                    $modx->queryCode .= 'Current Plugin => ' . $modx->event->activePlugin . '<br>';
201
+                    $modx->queryCode .= 'Current Plugin => '.$modx->event->activePlugin.'<br>';
202 202
                 }
203 203
                 if ($modx->currentSnippet) {
204
-                    $modx->queryCode .= 'Current Snippet => ' . $modx->currentSnippet . '<br>';
204
+                    $modx->queryCode .= 'Current Snippet => '.$modx->currentSnippet.'<br>';
205 205
                 }
206 206
                 if (stripos($sql, 'select') === 0) {
207
-                    $modx->queryCode .= 'Record Count => ' . $this->getRecordCount($result) . '<br>';
207
+                    $modx->queryCode .= 'Record Count => '.$this->getRecordCount($result).'<br>';
208 208
                 } else {
209
-                    $modx->queryCode .= 'Affected Rows => ' . $this->getAffectedRows() . '<br>';
209
+                    $modx->queryCode .= 'Affected Rows => '.$this->getAffectedRows().'<br>';
210 210
                 }
211
-                $modx->queryCode .= 'Functions Path => ' . $debug_path . '<br>';
211
+                $modx->queryCode .= 'Functions Path => '.$debug_path.'<br>';
212 212
                 $modx->queryCode .= "</fieldset><br />";
213 213
             }
214 214
             $modx->executedQueries++;
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
                     if ($value === null || strtolower($value) === 'null') {
316 316
                         $f = 'NULL';
317 317
                     } else {
318
-                        $f = "'" . $value . "'";
318
+                        $f = "'".$value."'";
319 319
                     }
320
-                    $fields[$key] = "`{$key}` = " . $f;
320
+                    $fields[$key] = "`{$key}` = ".$f;
321 321
                 }
322 322
                 $fields = implode(',', $fields);
323 323
             }
@@ -352,12 +352,12 @@  discard block
 block discarded – undo
352 352
                 $this->query("INSERT INTO {$intotable} {$fields}");
353 353
             } else {
354 354
                 if (empty($fromtable)) {
355
-                    $fields = "(`" . implode("`, `", array_keys($fields)) . "`) VALUES('" . implode("', '",
356
-                            array_values($fields)) . "')";
355
+                    $fields = "(`".implode("`, `", array_keys($fields))."`) VALUES('".implode("', '",
356
+                            array_values($fields))."')";
357 357
                     $this->query("INSERT INTO {$intotable} {$fields}");
358 358
                 } else {
359 359
                     $fromtable = $this->replaceFullTableName($fromtable);
360
-                    $fields = "(" . implode(",", array_keys($fields)) . ")";
360
+                    $fields = "(".implode(",", array_keys($fields)).")";
361 361
                     $where = trim($where);
362 362
                     $limit = trim($limit);
363 363
                     if ($where !== '' && stripos($where, 'WHERE') !== 0) {
@@ -451,8 +451,8 @@  discard block
 block discarded – undo
451 451
      */
452 452
     public function getInsertId($conn = null)
453 453
     {
454
-        if (! ($conn instanceof mysqli)) {
455
-            $conn =& $this->conn;
454
+        if (!($conn instanceof mysqli)) {
455
+            $conn = & $this->conn;
456 456
         }
457 457
 
458 458
         return $conn->insert_id;
@@ -464,8 +464,8 @@  discard block
 block discarded – undo
464 464
      */
465 465
     public function getAffectedRows($conn = null)
466 466
     {
467
-        if (! ($conn instanceof mysqli)) {
468
-            $conn =& $this->conn;
467
+        if (!($conn instanceof mysqli)) {
468
+            $conn = & $this->conn;
469 469
         }
470 470
 
471 471
         return $conn->affected_rows;
@@ -477,8 +477,8 @@  discard block
 block discarded – undo
477 477
      */
478 478
     public function getLastError($conn = null)
479 479
     {
480
-        if (! ($conn instanceof mysqli)) {
481
-            $conn =& $this->conn;
480
+        if (!($conn instanceof mysqli)) {
481
+            $conn = & $this->conn;
482 482
         }
483 483
 
484 484
         return $conn->error;
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
     {
503 503
         $out = false;
504 504
         if ($ds instanceof mysqli_result) {
505
-            switch($mode){
505
+            switch ($mode) {
506 506
                 case 'assoc':
507 507
                     $out = $ds->fetch_assoc();
508 508
                     break;
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     public function getColumn($name, $dsq)
533 533
     {
534 534
         $col = array();
535
-        if ( ! ($dsq instanceof mysqli_result)) {
535
+        if (!($dsq instanceof mysqli_result)) {
536 536
             $dsq = $this->query($dsq);
537 537
         }
538 538
         if ($dsq) {
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
     public function getColumnNames($dsq)
552 552
     {
553 553
         $names = array();
554
-        if ( ! ($dsq instanceof mysqli_result)) {
554
+        if (!($dsq instanceof mysqli_result)) {
555 555
             $dsq = $this->query($dsq);
556 556
         }
557 557
         if ($dsq) {
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
     public function getValue($dsq)
572 572
     {
573 573
         $out = false;
574
-        if ( ! ($dsq instanceof mysqli_result)) {
574
+        if (!($dsq instanceof mysqli_result)) {
575 575
             $dsq = $this->query($dsq);
576 576
         }
577 577
         if ($dsq) {
@@ -661,8 +661,8 @@  discard block
 block discarded – undo
661 661
 
662 662
     public function getTableName($table, $escape = true)
663 663
     {
664
-        $out = $this->getConfig('table_prefix') . $table;
665
-        return $escape ? '`' . $out . '`' : $out;
664
+        $out = $this->getConfig('table_prefix').$table;
665
+        return $escape ? '`'.$out.'`' : $out;
666 666
     }
667 667
 
668 668
     /**
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
      */
672 672
     public function getFullTableName($tbl)
673 673
     {
674
-        return $this->getConfig('dbase') . "." . $this->getTableName($tbl);
674
+        return $this->getConfig('dbase').".".$this->getTableName($tbl);
675 675
     }
676 676
 
677 677
     /**
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
         $tableName = trim($tableName);
685 685
         $dbase = trim($this->getConfig('dbase'), '`');
686 686
         $prefix = $this->getConfig('table_prefix');
687
-        if ((bool)$force === true) {
687
+        if ((bool) $force === true) {
688 688
             $result = "`{$dbase}`.`{$prefix}{$tableName}`";
689 689
         } elseif (strpos($tableName, '[+prefix+]') !== false) {
690 690
             $result = preg_replace('@\[\+prefix\+\]([0-9a-zA-Z_]+)@', "`{$dbase}`.`{$prefix}$1`", $tableName);
Please login to merge, or discard this patch.
manager/media/style/default/snippets/welcome/RecentInfo.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
 $tpl = '<tr>
8 8
     <td data-toggle="collapse" data-target=".collapse[+id+]" class="text-right"><span class="label label-info">[+id+]</span></td>
9 9
     <td data-toggle="collapse" data-target=".collapse[+id+]"><a class="[+status+]" title="[%edit_resource%]" href="index.php?a=3&amp;id=[+id+]" target="main">[+pagetitle+]</a></td>
10
-    <td data-toggle="collapse" data-target=".collapse[+id+]" class="text-right text-nowrap">[+editedon:math("%s+[(server_offset_time)]"):dateFormat=`'.$modx->toDateFormat(0,'formatOnly').' %H:%M:%S`+]</td>
10
+    <td data-toggle="collapse" data-target=".collapse[+id+]" class="text-right text-nowrap">[+editedon:math("%s+[(server_offset_time)]"):dateFormat=`'.$modx->toDateFormat(0, 'formatOnly').' %H:%M:%S`+]</td>
11 11
     <td data-toggle="collapse" data-target=".collapse[+id+]">[+username+]</td>
12 12
     <td style="text-align: right;" class="actions">[+edit_btn+][+preview_btn+][+delete_btn+][+publish_btn+][+info_btn+]</td>
13 13
 </tr>
Please login to merge, or discard this patch.
manager/includes/src/Support/MakeTable.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function setTableWidth($value)
134 134
     {
135
-        $this->tableWidth = (int)$value;
135
+        $this->tableWidth = (int) $value;
136 136
     }
137 137
 
138 138
     /**
@@ -318,8 +318,8 @@  discard block
 block discarded – undo
318 318
     public function getColumnWidth($columnPosition)
319 319
     {
320 320
         $currentWidth = '';
321
-        if (is_array($this->columnWidths) && ! empty($this->columnWidths[$columnPosition])) {
322
-            $currentWidth = ' width="' . $this->columnWidths[$columnPosition] . '" ';
321
+        if (is_array($this->columnWidths) && !empty($this->columnWidths[$columnPosition])) {
322
+            $currentWidth = ' width="'.$this->columnWidths[$columnPosition].'" ';
323 323
         }
324 324
 
325 325
         return $currentWidth;
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
             $currentClass = $this->rowAlternateClass;
349 349
         }
350 350
 
351
-        return ' class="' . $currentClass . '"';
351
+        return ' class="'.$currentClass.'"';
352 352
     }
353 353
 
354 354
     /**
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
     {
363 363
         $cellAction = '';
364 364
         if ($this->cellAction) {
365
-            $cellAction = ' onClick="javascript:window.location=\'' . $this->cellAction . $this->actionField . '=' . urlencode($currentActionFieldValue) . '\'" ';
365
+            $cellAction = ' onClick="javascript:window.location=\''.$this->cellAction.$this->actionField.'='.urlencode($currentActionFieldValue).'\'" ';
366 366
         }
367 367
 
368 368
         return $cellAction;
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
     {
380 380
         $cell = $value;
381 381
         if ($this->linkAction) {
382
-            $cell = '<a href="' . $this->linkAction . $this->actionField . '=' . urlencode($currentActionFieldValue) . '">' . $cell . '</a>';
382
+            $cell = '<a href="'.$this->linkAction.$this->actionField.'='.urlencode($currentActionFieldValue).'">'.$cell.'</a>';
383 383
         }
384 384
 
385 385
         return $cell;
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
             $end = '?';
409 409
         }
410 410
 
411
-        return $link . $end;
411
+        return $link.$end;
412 412
     }
413 413
 
414 414
     /**
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
         if (is_array($fieldsArray)) {
431 431
             $i = 0;
432 432
             foreach ($fieldsArray as $fieldName => $fieldValue) {
433
-                $table .= "\t<tr" . $this->determineRowClass($i) . ">\n";
433
+                $table .= "\t<tr".$this->determineRowClass($i).">\n";
434 434
                 $currentActionFieldValue = get_by_key($fieldValue, $this->actionField, '');
435 435
                 if (is_array($this->selectedValues)) {
436 436
                     $isChecked = array_search($currentActionFieldValue, $this->selectedValues) === false ? 0 : 1;
@@ -441,15 +441,15 @@  discard block
 block discarded – undo
441 441
                 $colPosition = 0;
442 442
                 foreach ($fieldValue as $key => $value) {
443 443
                     if (!in_array($key, $this->excludeFields)) {
444
-                        $table .= "\t\t<td" . $this->getCellAction($currentActionFieldValue) . ">";
444
+                        $table .= "\t\t<td".$this->getCellAction($currentActionFieldValue).">";
445 445
                         $table .= $this->createCellText($currentActionFieldValue, $value);
446 446
                         $table .= "</td>\n";
447 447
                         if ($i == 0) {
448 448
                             if (empty ($header) && $this->formElementType) {
449
-                                $header .= "\t\t<th style=\"width:32px\" " . ($this->thClass ? 'class="' . $this->thClass . '"' : '') . ">" . ($this->allOption ? '<a href="javascript:clickAll()">all</a>' : '') . "</th>\n";
449
+                                $header .= "\t\t<th style=\"width:32px\" ".($this->thClass ? 'class="'.$this->thClass.'"' : '').">".($this->allOption ? '<a href="javascript:clickAll()">all</a>' : '')."</th>\n";
450 450
                             }
451 451
                             $headerText = array_key_exists($key, $fieldHeadersArray) ? $fieldHeadersArray[$key] : $key;
452
-                            $header .= "\t\t<th" . $this->getColumnWidth($colPosition) . ($this->thClass ? ' class="' . $this->thClass . '" ' : '') . ">" . $headerText . "</th>\n";
452
+                            $header .= "\t\t<th".$this->getColumnWidth($colPosition).($this->thClass ? ' class="'.$this->thClass.'" ' : '').">".$headerText."</th>\n";
453 453
                         }
454 454
                         $colPosition++;
455 455
                     }
@@ -457,9 +457,9 @@  discard block
 block discarded – undo
457 457
                 $i++;
458 458
                 $table .= "\t</tr>\n";
459 459
             }
460
-            $table = "\n" . '<table' . ($this->tableWidth > 0 ? ' width="' . $this->tableWidth . '"' : '') . ($this->tableClass ? ' class="' . $this->tableClass . '"' : '') . ($this->tableID ? ' id="' . $this->tableID . '"' : '') . ">\n" . ($header ? "\t<thead>\n\t<tr class=\"" . $this->rowHeaderClass . "\">\n" . $header . "\t</tr>\n\t</thead>\n" : '') . $table . "</table>\n";
460
+            $table = "\n".'<table'.($this->tableWidth > 0 ? ' width="'.$this->tableWidth.'"' : '').($this->tableClass ? ' class="'.$this->tableClass.'"' : '').($this->tableID ? ' id="'.$this->tableID.'"' : '').">\n".($header ? "\t<thead>\n\t<tr class=\"".$this->rowHeaderClass."\">\n".$header."\t</tr>\n\t</thead>\n" : '').$table."</table>\n";
461 461
             if ($this->formElementType) {
462
-                $table = "\n" . '<form id="' . $this->formName . '" name="' . $this->formName . '" action="' . $this->formAction . '" method="POST">' . $table;
462
+                $table = "\n".'<form id="'.$this->formName.'" name="'.$this->formName.'" action="'.$this->formAction.'" method="POST">'.$table;
463 463
             }
464 464
             if (strlen($this->pageNav) > 1) {//changed to display the pagination if exists.
465 465
                 /* commented this part because of cookie
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 
474 474
                 $table .= '</select>'.$_lang["pagination_table_perpage"].'</div>';
475 475
                 */
476
-                $table .= '<div id="pagination" class="paginate">' . $_lang["pagination_table_gotopage"] . '<ul>' . $this->pageNav . '</ul></div>';
476
+                $table .= '<div id="pagination" class="paginate">'.$_lang["pagination_table_gotopage"].'<ul>'.$this->pageNav.'</ul></div>';
477 477
                 //$table .= '<script language="javascript">function updatePageSize(size){window.location = \''.$this->prepareLink($linkpage).'pageSize=\'+size;}</script>';
478 478
 
479 479
             }
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 <script language="javascript">
483 483
 	toggled = 0;
484 484
 	function clickAll() {
485
-		myform = document.getElementById("' . $this->formName . '");
485
+		myform = document.getElementById("' . $this->formName.'");
486 486
 		for(i=0;i<myform.length;i++) {
487 487
 			if(myform.elements[i].type==\'checkbox\') {
488 488
 				myform.elements[i].checked=(toggled?false:true);
@@ -494,9 +494,9 @@  discard block
 block discarded – undo
494 494
             }
495 495
             if ($this->formElementType) {
496 496
                 if ($this->extra) {
497
-                    $table .= "\n" . $this->extra . "\n";
497
+                    $table .= "\n".$this->extra."\n";
498 498
                 }
499
-                $table .= "\n" . '</form>' . "\n";
499
+                $table .= "\n".'</form>'."\n";
500 500
             }
501 501
 
502 502
             return $table;
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
         $numPages = ceil($numRecords / MAX_DISPLAY_RECORDS_NUM);
520 520
         $nav = '';
521 521
         if ($numPages > 1) {
522
-            $currentURL = empty($qs) ? '' : '?' . $qs;
522
+            $currentURL = empty($qs) ? '' : '?'.$qs;
523 523
             if ($currentPage > 6) {
524 524
                 $nav .= $this->createPageLink($currentURL, 1, $_lang["pagination_table_first"]);
525 525
             }
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
                 $nav .= $this->createPageLink($currentURL, $numPages, $_lang["pagination_table_last"]);
545 545
             }
546 546
         }
547
-        $this->pageNav = ' ' . $nav;
547
+        $this->pageNav = ' '.$nav;
548 548
     }
549 549
 
550 550
     /**
@@ -560,14 +560,14 @@  discard block
 block discarded – undo
560 560
     public function createPageLink($link = '', $pageNum, $displayText, $currentPage = false, $qs = '')
561 561
     {
562 562
         $modx = evolutionCMS();
563
-        $orderBy = !empty($_GET['orderby']) ? '&orderby=' . $_GET['orderby'] : '';
564
-        $orderDir = !empty($_GET['orderdir']) ? '&orderdir=' . $_GET['orderdir'] : '';
563
+        $orderBy = !empty($_GET['orderby']) ? '&orderby='.$_GET['orderby'] : '';
564
+        $orderDir = !empty($_GET['orderdir']) ? '&orderdir='.$_GET['orderdir'] : '';
565 565
         if (!empty($qs)) {
566 566
             $qs = "?$qs";
567 567
         }
568 568
         $link = empty($link) ? $modx->makeUrl($modx->documentIdentifier, $modx->documentObject['alias'],
569
-            $qs . "page=$pageNum$orderBy$orderDir") : $this->prepareLink($link) . "page=$pageNum";
570
-        $nav = '<li' . ($currentPage ? ' class="currentPage"' : '') . '><a' . ($currentPage ? ' class="currentPage"' : '') . ' href="' . $link . '">' . $displayText . '</a></li>' . "\n";
569
+            $qs."page=$pageNum$orderBy$orderDir") : $this->prepareLink($link)."page=$pageNum";
570
+        $nav = '<li'.($currentPage ? ' class="currentPage"' : '').'><a'.($currentPage ? ' class="currentPage"' : '').' href="'.$link.'">'.$displayText.'</a></li>'."\n";
571 571
 
572 572
         return $nav;
573 573
     }
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
         $field = '';
586 586
         if ($this->formElementType) {
587 587
             $checked = $isChecked ? "checked " : "";
588
-            $field = "\t\t" . '<td><input type="' . $this->formElementType . '" name="' . ($this->formElementName ? $this->formElementName : $value) . '"  value="' . $value . '" ' . $checked . '/></td>' . "\n";
588
+            $field = "\t\t".'<td><input type="'.$this->formElementType.'" name="'.($this->formElementName ? $this->formElementName : $value).'"  value="'.$value.'" '.$checked.'/></td>'."\n";
589 589
         }
590 590
 
591 591
         return $field;
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
     public function handlePaging()
600 600
     {
601 601
         $offset = (is_numeric($_GET['page']) && $_GET['page'] > 0) ? $_GET['page'] - 1 : 0;
602
-        $limitClause = ' LIMIT ' . ($offset * MAX_DISPLAY_RECORDS_NUM) . ', ' . MAX_DISPLAY_RECORDS_NUM;
602
+        $limitClause = ' LIMIT '.($offset * MAX_DISPLAY_RECORDS_NUM).', '.MAX_DISPLAY_RECORDS_NUM;
603 603
 
604 604
         return $limitClause;
605 605
     }
@@ -614,10 +614,10 @@  discard block
 block discarded – undo
614 614
     public function handleSorting($natural_order = false)
615 615
     {
616 616
         $orderByClause = '';
617
-        if ((bool)$natural_order === false) {
617
+        if ((bool) $natural_order === false) {
618 618
             $orderby = !empty($_GET['orderby']) ? $_GET['orderby'] : "id";
619 619
             $orderdir = !empty($_GET['orderdir']) ? $_GET['orderdir'] : "DESC";
620
-            $orderByClause = !empty($orderby) ? ' ORDER BY ' . $orderby . ' ' . $orderdir . ' ' : "";
620
+            $orderByClause = !empty($orderby) ? ' ORDER BY '.$orderby.' '.$orderdir.' ' : "";
621 621
         }
622 622
 
623 623
         return $orderByClause;
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
             }
647 647
         }
648 648
 
649
-        return '<a href="[~' . $modx->documentIdentifier . '~]?' . $qs . 'orderby=' . $key . $orderDir . '">' . $text . '</a>';
649
+        return '<a href="[~'.$modx->documentIdentifier.'~]?'.$qs.'orderby='.$key.$orderDir.'">'.$text.'</a>';
650 650
     }
651 651
 
652 652
 }
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab7_filebrowser_settings.inc.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
   <tr>
7 7
     <td nowrap class="warning"><?php echo $_lang['rb_title']?><br><small>[(use_browser)]</small></td>
8 8
     <td>
9
-        <?php echo wrap_label($_lang['yes'],form_radio('use_browser', 1, 'id="rbRowOn"'));?><br />
10
-        <?php echo wrap_label($_lang['no'], form_radio('use_browser', 0, 'id="rbRowOff"'));?>
9
+        <?php echo wrap_label($_lang['yes'], form_radio('use_browser', 1, 'id="rbRowOn"')); ?><br />
10
+        <?php echo wrap_label($_lang['no'], form_radio('use_browser', 0, 'id="rbRowOff"')); ?>
11 11
     </td>
12 12
   </tr>
13 13
   <tr>
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     <td colspan="2"><div class="split"></div></td>
19 19
   </tr>
20 20
   
21
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
21
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
22 22
     <td nowrap class="warning"><?php echo $_lang['which_browser_default_title']?><br><small>[(which_browser)]</small></td>
23 23
     <td>
24 24
         <select name="which_browser" size="1" class="inputBox" onchange="documentDirty=true;">
@@ -27,125 +27,125 @@  discard block
 block discarded – undo
27 27
                 $dir = str_replace('\\', '/', $dir);
28 28
                 $browser_name = substr($dir, strrpos($dir, '/') + 1);
29 29
                 $selected = $browser_name == $which_browser ? ' selected="selected"' : '';
30
-                echo '<option value="' . $browser_name . '"' . $selected . '>' . "{$browser_name}</option>\n";
30
+                echo '<option value="'.$browser_name.'"'.$selected.'>'."{$browser_name}</option>\n";
31 31
             }
32 32
             ?>
33 33
         </select>
34 34
     </td>
35 35
   </tr>
36
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
36
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
37 37
     <td width="200">&nbsp;</td>
38 38
     <td class="comment"><?php echo $_lang['which_browser_default_msg']?></td>
39 39
   </tr>
40 40
   <tr>
41 41
     <td colspan="2"><div class="split"></div></td>
42 42
   </tr>
43
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
43
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
44 44
     <td nowrap class="warning"><?php echo $_lang['rb_webuser_title']?><br><small>[(rb_webuser)]</small></td>
45 45
     <td>
46
-      <label><input type="radio" name="rb_webuser" value="1" <?php echo $rb_webuser=='1' ? 'checked="checked"' : "" ; ?> />
46
+      <label><input type="radio" name="rb_webuser" value="1" <?php echo $rb_webuser == '1' ? 'checked="checked"' : ""; ?> />
47 47
       <?php echo $_lang['yes']?></label><br />
48
-      <label><input type="radio" name="rb_webuser" value="0" <?php echo $rb_webuser=='0' ? 'checked="checked"' : "" ; ?> />
48
+      <label><input type="radio" name="rb_webuser" value="0" <?php echo $rb_webuser == '0' ? 'checked="checked"' : ""; ?> />
49 49
       <?php echo $_lang['no']?></label>
50 50
     </td>
51 51
   </tr>
52
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
52
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
53 53
     <td width="200">&nbsp;</td>
54 54
     <td class="comment"><?php echo $_lang['rb_webuser_message']?></td>
55 55
   </tr>
56
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
56
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
57 57
     <td colspan="2"><div class="split"></div></td>
58 58
   </tr>
59
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
59
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
60 60
     <td nowrap class="warning"><?php echo $_lang['rb_base_dir_title']?><br><small>[(rb_base_dir)]</small></td>
61 61
     <td>
62 62
         <?php echo $_lang['default']; ?> <span id="default_rb_base_dir">[(base_path)]assets/</span><br />
63 63
         <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="rb_base_dir" id="rb_base_dir" value="<?php echo $rb_base_dir; ?>" /> <input type="button" onclick="reset_path('rb_base_dir');" value="<?php echo $_lang['reset']; ?>" name="reset_rb_base_dir">
64 64
     </td>
65 65
   </tr>
66
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
66
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
67 67
     <td width="200">&nbsp;</td>
68 68
     <td class="comment"><?php echo $_lang['rb_base_dir_message']?></td>
69 69
   </tr>
70
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
70
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
71 71
     <td colspan="2"><div class="split"></div></td>
72 72
   </tr>
73
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
73
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
74 74
     <td nowrap class="warning"><?php echo $_lang['rb_base_url_title']?><br><small>[(rb_base_url)]</small></td>
75 75
     <td>
76 76
       <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="rb_base_url" value="<?php echo $rb_base_url; ?>" />
77 77
       </td>
78 78
   </tr>
79
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
79
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
80 80
     <td width="200">&nbsp;</td>
81 81
     <td class="comment"><?php echo $_lang['rb_base_url_message']?></td>
82 82
   </tr>
83
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
83
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
84 84
     <td colspan="2"><div class="split"></div></td>
85 85
   </tr>
86
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
86
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
87 87
       <td nowrap class="warning"><?php echo $_lang['clean_uploaded_filename']?><br><small>[(clean_uploaded_filename)]</small></td>
88 88
       <td>
89
-        <label><input type="radio" name="clean_uploaded_filename" value="1" <?php echo $clean_uploaded_filename=='1' ? 'checked="checked"' : "" ; ?> />
89
+        <label><input type="radio" name="clean_uploaded_filename" value="1" <?php echo $clean_uploaded_filename == '1' ? 'checked="checked"' : ""; ?> />
90 90
         <?php echo $_lang['yes']?></label><br />
91
-        <label><input type="radio" name="clean_uploaded_filename" value="0" <?php echo $clean_uploaded_filename=='0' ? 'checked="checked"' : "" ; ?> />
91
+        <label><input type="radio" name="clean_uploaded_filename" value="0" <?php echo $clean_uploaded_filename == '0' ? 'checked="checked"' : ""; ?> />
92 92
         <?php echo $_lang['no']?></label>
93 93
       </td>
94 94
   </tr>
95
-    <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
95
+    <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
96 96
       <td width="200">&nbsp;</td>
97
-      <td class="comment"><?php echo $_lang['clean_uploaded_filename_message'];?></td>
97
+      <td class="comment"><?php echo $_lang['clean_uploaded_filename_message']; ?></td>
98 98
     </tr>
99
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
99
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
100 100
   <td colspan="2"><div class="split"></div></td>
101 101
   </tr>
102
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
102
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
103 103
     <td nowrap class="warning"><?php echo $_lang['settings_strip_image_paths_title']?><br><small>[(strip_image_paths)]</small></td>
104 104
     <td>
105
-      <label><input type="radio" name="strip_image_paths" value="1" <?php echo $strip_image_paths=='1' ? 'checked="checked"' : "" ; ?> />
105
+      <label><input type="radio" name="strip_image_paths" value="1" <?php echo $strip_image_paths == '1' ? 'checked="checked"' : ""; ?> />
106 106
       <?php echo $_lang['yes']?></label><br />
107
-      <label><input type="radio" name="strip_image_paths" value="0" <?php echo $strip_image_paths=='0' ? 'checked="checked"' : "" ; ?> />
107
+      <label><input type="radio" name="strip_image_paths" value="0" <?php echo $strip_image_paths == '0' ? 'checked="checked"' : ""; ?> />
108 108
       <?php echo $_lang['no']?></label>
109 109
     </td>
110 110
   </tr>
111
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
111
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
112 112
     <td width="200">&nbsp;</td>
113 113
     <td class="comment"><?php echo $_lang['settings_strip_image_paths_message']?></td>
114 114
   </tr>
115
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
115
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
116 116
     <td colspan="2"><div class="split"></div></td>
117 117
   </tr>
118
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
118
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
119 119
     <td nowrap class="warning"><?php echo $_lang['maxImageWidth']?><br><small>[(maxImageWidth)]</small></td>
120 120
     <td>
121 121
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="maxImageWidth" value="<?php echo $maxImageWidth; ?>" />
122 122
     </td>
123 123
   </tr>
124
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
124
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
125 125
     <td width="200">&nbsp;</td>
126 126
     <td class="comment"><?php echo $_lang['maxImageWidth_message']?></td>
127 127
   </tr>
128
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
128
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
129 129
     <td colspan="2"><div class="split"></div></td>
130 130
   </tr>
131
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
131
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
132 132
     <td nowrap class="warning"><?php echo $_lang['maxImageHeight']?><br><small>[(maxImageHeight)]</small></td>
133 133
     <td>
134 134
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="maxImageHeight" value="<?php echo $maxImageHeight; ?>" />
135 135
     </td>
136 136
   </tr>
137
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
137
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
138 138
     <td width="200">&nbsp;</td>
139 139
     <td class="comment"><?php echo $_lang['maxImageHeight_message']?></td>
140 140
   </tr>
141
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
141
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
142 142
     <td colspan="2"><div class="split"></div></td>
143 143
   </tr>
144
-    <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
144
+    <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
145 145
         <td nowrap class="warning"><?php echo $_lang['clientResize']?><br><small>[(clientResize)]</small></td>
146 146
         <td>
147
-            <?php echo wrap_label($_lang['yes'],form_radio('clientResize', 1, ''));?><br />
148
-            <?php echo wrap_label($_lang['no'], form_radio('clientResize', 0, ''));?>
147
+            <?php echo wrap_label($_lang['yes'], form_radio('clientResize', 1, '')); ?><br />
148
+            <?php echo wrap_label($_lang['no'], form_radio('clientResize', 0, '')); ?>
149 149
         </td>
150 150
     </tr>
151 151
     <tr>
@@ -155,11 +155,11 @@  discard block
 block discarded – undo
155 155
     <tr>
156 156
         <td colspan="2"><div class="split"></div></td>
157 157
     </tr>
158
-    <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
158
+    <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
159 159
         <td nowrap class="warning"><?php echo $_lang['noThumbnailsRecreation']?><br><small>[(noThumbnailsRecreation)]</small></td>
160 160
         <td>
161
-            <?php echo wrap_label($_lang['yes'],form_radio('noThumbnailsRecreation', 1, ''));?><br />
162
-            <?php echo wrap_label($_lang['no'], form_radio('noThumbnailsRecreation', 0, ''));?>
161
+            <?php echo wrap_label($_lang['yes'], form_radio('noThumbnailsRecreation', 1, '')); ?><br />
162
+            <?php echo wrap_label($_lang['no'], form_radio('noThumbnailsRecreation', 0, '')); ?>
163 163
         </td>
164 164
     </tr>
165 165
     <tr>
@@ -170,92 +170,92 @@  discard block
 block discarded – undo
170 170
         <td colspan="2"><div class="split"></div></td>
171 171
     </tr>
172 172
 
173
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
173
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
174 174
     <td nowrap class="warning"><?php echo $_lang['thumbWidth']?><br><small>[(thumbWidth)]</small></td>
175 175
     <td>
176 176
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbWidth" value="<?php echo $thumbWidth; ?>" />
177 177
     </td>
178 178
   </tr>
179
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
179
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
180 180
     <td width="200">&nbsp;</td>
181 181
     <td class="comment"><?php echo $_lang['thumbWidth_message']?></td>
182 182
   </tr>
183
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
183
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
184 184
     <td colspan="2"><div class="split"></div></td>
185 185
   </tr>
186
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
186
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
187 187
     <td nowrap class="warning"><?php echo $_lang['thumbHeight']?><br><small>[(thumbHeight)]</small></td>
188 188
     <td>
189 189
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbHeight" value="<?php echo $thumbHeight; ?>" />
190 190
     </td>
191 191
   </tr>
192
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
192
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
193 193
     <td width="200">&nbsp;</td>
194 194
     <td class="comment"><?php echo $_lang['thumbHeight_message']?></td>
195 195
   </tr>
196
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
196
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
197 197
     <td colspan="2"><div class="split"></div></td>
198 198
   </tr>
199
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
199
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
200 200
     <td nowrap class="warning"><?php echo $_lang['thumbsDir']?><br><small>[(thumbsDir)]</small></td>
201 201
     <td>
202 202
       <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="thumbsDir" value="<?php echo $thumbsDir; ?>" />
203 203
     </td>
204 204
   </tr>
205
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
205
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
206 206
     <td width="200">&nbsp;</td>
207 207
     <td class="comment"><?php echo $_lang['thumbsDir_message']?></td>
208 208
   </tr>
209
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
209
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
210 210
     <td colspan="2"><div class="split"></div></td>
211 211
   </tr>
212
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
212
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
213 213
     <td nowrap class="warning"><?php echo $_lang['jpegQuality']?><br><small>[(jpegQuality)]</small></td>
214 214
     <td>
215 215
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="jpegQuality" value="<?php echo $jpegQuality; ?>" />
216 216
     </td>
217 217
   </tr>
218
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
218
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
219 219
     <td width="200">&nbsp;</td>
220 220
     <td class="comment"><?php echo $_lang['jpegQuality_message']?></td>
221 221
   </tr>
222
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
222
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
223 223
     <td colspan="2"><div class="split"></div></td>
224 224
   </tr>
225
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
225
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
226 226
        <td nowrap class="warning"><?php echo $_lang['denyZipDownload'] ?><br><small>[(denyZipDownload)]</small></td>
227 227
         <td>
228
-          <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload=='0' ? 'checked="checked"' : ""; ?> />
228
+          <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload == '0' ? 'checked="checked"' : ""; ?> />
229 229
           <?php echo $_lang['no']?></label><br />
230
-          <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload=='1' ? 'checked="checked"' : ""; ?> />
230
+          <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload == '1' ? 'checked="checked"' : ""; ?> />
231 231
           <?php echo $_lang['yes']?></label>
232 232
         </td>
233 233
   </tr>
234
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
234
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
235 235
     <td colspan="2"><div class="split"></div></td>
236 236
   </tr>
237
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
237
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
238 238
         <td nowrap class="warning"><?php echo $_lang['denyExtensionRename'] ?><br><small>[(denyExtensionRename)]</small></td>
239 239
         <td>
240
-           <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename=='0' ? 'checked="checked"' : ""; ?> />
240
+           <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename == '0' ? 'checked="checked"' : ""; ?> />
241 241
            <?php echo $_lang['no']?></label><br />
242
-           <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename=='1' ? 'checked="checked"' : ""; ?> />
242
+           <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename == '1' ? 'checked="checked"' : ""; ?> />
243 243
            <?php echo $_lang['yes']?></label>
244 244
         </td>
245 245
   </tr>
246
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
246
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
247 247
     <td colspan="2"><div class="split"></div></td>
248 248
   </tr>
249
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
249
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
250 250
        <td nowrap class="warning"><?php echo $_lang['showHiddenFiles'] ?><br><small>[(showHiddenFiles)]</small></td>
251 251
        <td>
252
-         <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles=='0' ? 'checked="checked"' : ""; ?> />
252
+         <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles == '0' ? 'checked="checked"' : ""; ?> />
253 253
          <?php echo $_lang['no']?></label><br />
254
-         <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles=='1' ? 'checked="checked"' : ""; ?> />
254
+         <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles == '1' ? 'checked="checked"' : ""; ?> />
255 255
          <?php echo $_lang['yes']?></label>
256 256
         </td>
257 257
   </tr>
258
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
258
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
259 259
     <td colspan="2"><div class="split"></div></td>
260 260
   </tr>
261 261
   
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         <?php
265 265
             // invoke OnMiscSettingsRender event
266 266
             $evtOut = $modx->invokeEvent('OnMiscSettingsRender');
267
-            if(is_array($evtOut)) echo implode("",$evtOut);
267
+            if (is_array($evtOut)) echo implode("", $evtOut);
268 268
         ?>
269 269
     </td>
270 270
   </tr>
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     'assetsURL'           => rtrim($modx->config['rb_base_url'], '/'),
30 30
     'dirPerms'            => intval($modx->config['new_folder_permissions'], 8),
31 31
     'filePerms'           => intval($modx->config['new_file_permissions'], 8),
32
-    'maxfilesize'         => (int)$modx->config['upload_maxsize'],
32
+    'maxfilesize'         => (int) $modx->config['upload_maxsize'],
33 33
     'noThumbnailsRecreation' => $modx->config['noThumbnailsRecreation'],
34 34
 
35 35
     'access' => array(
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     // THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION CONFIGURATION
90 90
     '_check4htaccess' => false,
91
-    '_tinyMCEPath'    => MODX_BASE_URL . "assets/plugins/tinymce/tiny_mce",
91
+    '_tinyMCEPath'    => MODX_BASE_URL."assets/plugins/tinymce/tiny_mce",
92 92
 
93 93
     '_sessionVar' => &$_SESSION['KCFINDER'],
94 94
     //'_sessionLifetime' => 30,
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/core/autoload.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
 if (empty ($modx->config)) {
27 27
     $modx->getSettings();
28 28
 }
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
 $manager_language = $modx->config['manager_language'];
33 33
 // Pass language code from MODX to KCFinder
34
-if(!file_exists("../../../includes/lang/".$manager_language.".inc.php")) {
34
+if (!file_exists("../../../includes/lang/".$manager_language.".inc.php")) {
35 35
     $manager_language = "english"; // if not set, get the english language file.
36 36
 }
37 37
 include_once "../../../includes/lang/".$manager_language.".inc.php";
38 38
 $_GET['langCode'] = $modx_lang_attribute;
39 39
 
40 40
 // MAGIC AUTOLOAD CLASSES FUNCTION
41
-function autoloadda9d06472ccb71b84928677ce2a6ca89($class) {
41
+function autoloadda9d06472ccb71b84928677ce2a6ca89($class){
42 42
     static $classes = null;
43 43
     if ($classes === null) {
44 44
         $classes = array(
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         );
63 63
     }
64 64
     if (isset($classes[$class])) {
65
-        require dirname(__FILE__) . $classes[$class];
65
+        require dirname(__FILE__).$classes[$class];
66 66
     }
67 67
 }
68 68
 spl_autoload_register('autoloadda9d06472ccb71b84928677ce2a6ca89', true);
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/core/uploader.php 1 patch
Spacing   +41 added lines, -42 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
   *      @link http://kcfinder.sunhater.com
13 13
   */
14 14
 
15
-class uploader {
15
+class uploader{
16 16
 
17 17
 /** Release version */
18 18
     const VERSION = "2.54";
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 
73 73
 /** Next three properties are got from the current language file
74 74
   * @var string */
75
-    protected $dateTimeFull;   // Currently not used
76
-    protected $dateTimeMid;    // Currently not used
75
+    protected $dateTimeFull; // Currently not used
76
+    protected $dateTimeMid; // Currently not used
77 77
     protected $dateTimeSmall;
78 78
 
79 79
 /** Contain Specified language labels
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 /** Magic method which allows read-only access to protected or private class properties
105 105
   * @param string $property
106 106
   * @return mixed */
107
-    public function __get($property) {
107
+    public function __get($property){
108 108
         return property_exists($this, $property) ? $this->$property : null;
109 109
     }
110 110
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      * uploader constructor.
113 113
      * @param DocumentParser $modx
114 114
      */
115
-    public function __construct(DocumentParser $modx) {
115
+    public function __construct(DocumentParser $modx){
116 116
 
117 117
         //MODX
118 118
         try {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
         // COOKIES INIT
197 197
         $ip = '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
198
-        $ip = '/^' . implode('\.', array($ip, $ip, $ip, $ip)) . '$/';
198
+        $ip = '/^'.implode('\.', array($ip, $ip, $ip, $ip)).'$/';
199 199
         if (preg_match($ip, $_SERVER['HTTP_HOST']) ||
200 200
             preg_match('/^[^\.]+$/', $_SERVER['HTTP_HOST'])
201 201
         )
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         ) {
214 214
             list($unused, $protocol, $domain, $unused, $port, $path) = $patt;
215 215
             $path = path::normalize($path);
216
-            $this->config['uploadURL'] = "$protocol://$domain" . (strlen($port) ? ":$port" : "") . "/$path";
216
+            $this->config['uploadURL'] = "$protocol://$domain".(strlen($port) ? ":$port" : "")."/$path";
217 217
             $this->config['uploadDir'] = strlen($this->config['uploadDir'])
218 218
                 ? path::normalize($this->config['uploadDir'])
219 219
                 : path::url2fullPath("/$path");
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         foreach ($this->langInputNames as $key)
257 257
             if (isset($this->get[$key]) &&
258 258
                 preg_match('/^[a-z][a-z\._\-]*$/i', $this->get[$key]) &&
259
-                file_exists("lang/" . strtolower($this->get[$key]) . ".php")
259
+                file_exists("lang/".strtolower($this->get[$key]).".php")
260 260
             ) {
261 261
                 $this->lang = $this->get[$key];
262 262
                 break;
@@ -290,12 +290,12 @@  discard block
 block discarded – undo
290 290
     /**
291 291
      * @return array|bool|int|null|string|void
292 292
      */
293
-    protected function getTransaliasSettings() {
293
+    protected function getTransaliasSettings(){
294 294
 		$modx = evolutionCMS();
295 295
 
296 296
 		// Cleaning uploaded filename?
297 297
 		$setting = $modx->getDatabase()->select('count(*)', $modx->getDatabase()->getFullTableName('system_settings'), 'setting_name="clean_uploaded_filename" AND setting_value=1');
298
-		if ($modx->getDatabase()->getValue($setting)>0) {
298
+		if ($modx->getDatabase()->getValue($setting) > 0) {
299 299
 			// Transalias plugin active?
300 300
 			$res = $modx->getDatabase()->select('properties', $modx->getDatabase()->getFullTableName('site_plugins'), 'name="TransAlias" AND disabled=0');
301 301
 			if ($properties = $modx->getDatabase()->getValue($res)) {
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      * @param $filename
315 315
      * @return mixed|string
316 316
      */
317
-    protected function normalizeFilename($filename) {
317
+    protected function normalizeFilename($filename){
318 318
 		if ($this->getTransaliasSettings()) {
319 319
         		$format = strrchr($filename, ".");
320 320
         		$filename = str_replace($format, "", $filename);
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
      * @param $dirname
328 328
      * @return string
329 329
      */
330
-    protected function normalizeDirname($dirname) {
330
+    protected function normalizeDirname($dirname){
331 331
         return $this->modx->stripAlias($dirname);
332 332
     }
333 333
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      * @param array|null $aFile
336 336
      * @return bool|mixed
337 337
      */
338
-    protected function checkUploadedFile(array $aFile=null) {
338
+    protected function checkUploadedFile(array $aFile = null){
339 339
         $config = &$this->config;
340 340
         $file = ($aFile === null) ? $this->file : $aFile;
341 341
 
@@ -361,8 +361,7 @@  discard block
 block discarded – undo
361 361
                 ($file['error'] == UPLOAD_ERR_NO_TMP_DIR) ?
362 362
                     $this->label("Missing a temporary folder.") : (
363 363
                 ($file['error'] == UPLOAD_ERR_CANT_WRITE) ?
364
-                    $this->label("Failed to write file.") :
365
-                    $this->label("Unknown error.")
364
+                    $this->label("Failed to write file.") : $this->label("Unknown error.")
366 365
             )))));
367 366
 
368 367
         // HIDDEN FILENAMES CHECK
@@ -397,7 +396,7 @@  discard block
 block discarded – undo
397 396
 
398 397
 
399 398
 	// CHECK FOR MODX MAX FILE SIZE
400
-	$actualfilesize=filesize($file['tmp_name']);
399
+	$actualfilesize = filesize($file['tmp_name']);
401 400
 	if (isset($this->config['maxfilesize']) && $actualfilesize > $this->config['maxfilesize'])
402 401
 	    return $this->label("File is too big: ".$actualfilesize." Bytes. (max ".$this->config['maxfilesize']." Bytes)");
403 402
 
@@ -410,7 +409,7 @@  discard block
 block discarded – undo
410 409
      * @param bool $existing
411 410
      * @return bool|string
412 411
      */
413
-    protected function checkInputDir($dir, $inclType=true, $existing=true) {
412
+    protected function checkInputDir($dir, $inclType = true, $existing = true){
414 413
         $dir = path::normalize($dir);
415 414
         if (substr($dir, 0, 1) == "/")
416 415
             $dir = substr($dir, 1);
@@ -441,7 +440,7 @@  discard block
 block discarded – undo
441 440
      * @param $type
442 441
      * @return bool
443 442
      */
444
-    protected function validateExtension($ext, $type) {
443
+    protected function validateExtension($ext, $type){
445 444
         $ext = trim(strtolower($ext));
446 445
         if (!isset($this->types[$type]))
447 446
             return false;
@@ -470,7 +469,7 @@  discard block
 block discarded – undo
470 469
      * @param $path
471 470
      * @return mixed
472 471
      */
473
-    protected function getTypeFromPath($path) {
472
+    protected function getTypeFromPath($path){
474 473
         return preg_match('/^([^\/]*)\/.*$/', $path, $patt)
475 474
             ? $patt[1] : $path;
476 475
     }
@@ -479,7 +478,7 @@  discard block
 block discarded – undo
479 478
      * @param $path
480 479
      * @return string
481 480
      */
482
-    protected function removeTypeFromPath($path) {
481
+    protected function removeTypeFromPath($path){
483 482
         return preg_match('/^[^\/]*\/(.*)$/', $path, $patt)
484 483
             ? $patt[1] : "";
485 484
     }
@@ -489,7 +488,7 @@  discard block
 block discarded – undo
489 488
      * @param null $file
490 489
      * @return bool
491 490
      */
492
-    protected function imageResize($image, $file=null) {
491
+    protected function imageResize($image, $file = null){
493 492
 
494 493
         if (!($image instanceof image)) {
495 494
             $img = image::factory($this->imageDriver, $image);
@@ -577,19 +576,19 @@  discard block
 block discarded – undo
577 576
             $img->watermark($this->config['watermark']['file'], $left, $top);
578 577
 		}
579 578
 
580
-        $options = array( 'file' => $file );
579
+        $options = array('file' => $file);
581 580
 
582
-        $type = exif_imagetype( $file );
581
+        $type = exif_imagetype($file);
583 582
 
584
-        switch ( $type ) {
583
+        switch ($type) {
585 584
             case IMAGETYPE_GIF:
586
-                return $img->output( 'gif', $options );
585
+                return $img->output('gif', $options);
587 586
 
588 587
             case IMAGETYPE_PNG:
589
-                return $img->output( 'png', $options );
588
+                return $img->output('png', $options);
590 589
 
591 590
             default:
592
-                return $img->output( 'jpeg', array_merge( $options, array( 'quality' => $this->config['jpegQuality'] ) ) );
591
+                return $img->output('jpeg', array_merge($options, array('quality' => $this->config['jpegQuality'])));
593 592
         }
594 593
 
595 594
     }
@@ -599,7 +598,7 @@  discard block
 block discarded – undo
599 598
      * @param bool $overwrite
600 599
      * @return bool
601 600
      */
602
-    protected function makeThumb($file, $overwrite=true) {
601
+    protected function makeThumb($file, $overwrite = true){
603 602
         $img = image::factory($this->imageDriver, $file);
604 603
 
605 604
         // Drop files which are not images
@@ -607,7 +606,7 @@  discard block
 block discarded – undo
607 606
             return true;
608 607
 
609 608
         $thumb = substr($file, strlen($this->config['uploadDir']));
610
-        $thumb = $this->config['uploadDir'] . "/" . $this->config['thumbsDir'] . "/" . $thumb;
609
+        $thumb = $this->config['uploadDir']."/".$this->config['thumbsDir']."/".$thumb;
611 610
         $thumb = path::normalize($thumb);
612 611
         $thumbDir = dirname($thumb);
613 612
         if (!is_dir($thumbDir) && !@mkdir($thumbDir, $this->config['dirPerms'], true))
@@ -630,15 +629,15 @@  discard block
 block discarded – undo
630 629
         if (!$img->resizeFit($this->config['thumbWidth'], $this->config['thumbHeight']))
631 630
             return false;
632 631
 
633
-        if ( $this->imageDriver == 'gd' ) {
634
-            $width  = imagesx( $img->image );
635
-            $height = imagesy( $img->image );
636
-            $back   = image::factory( $this->imageDriver, array( $width, $height ) );
637
-            $tile   = image::factory( $this->imageDriver, __DIR__ . '/../themes/' . $this->config['theme'] . '/img/bg_transparent.png' );
632
+        if ($this->imageDriver == 'gd') {
633
+            $width  = imagesx($img->image);
634
+            $height = imagesy($img->image);
635
+            $back   = image::factory($this->imageDriver, array($width, $height));
636
+            $tile   = image::factory($this->imageDriver, __DIR__.'/../themes/'.$this->config['theme'].'/img/bg_transparent.png');
638 637
 
639
-            imagesettile( $back->image, $tile->image );
640
-            imagefilledrectangle( $back->image, 0, 0, $width, $height, IMG_COLOR_TILED );
641
-            imagecopy( $back->image, $img->image, 0, 0, 0, 0, $width, $height );
638
+            imagesettile($back->image, $tile->image);
639
+            imagefilledrectangle($back->image, 0, 0, $width, $height, IMG_COLOR_TILED);
640
+            imagecopy($back->image, $img->image, 0, 0, 0, 0, $width, $height);
642 641
 
643 642
             $img = $back;
644 643
         }
@@ -653,7 +652,7 @@  discard block
 block discarded – undo
653 652
     /**
654 653
      * @param $langCode
655 654
      */
656
-    protected function localize($langCode) {
655
+    protected function localize($langCode){
657 656
         require "lang/{$langCode}.php";
658 657
         setlocale(LC_ALL, $lang['_locale']);
659 658
         $this->charset = $lang['_charset'];
@@ -673,7 +672,7 @@  discard block
 block discarded – undo
673 672
      * @param array|null $data
674 673
      * @return mixed
675 674
      */
676
-    protected function label($string, array $data=null) {
675
+    protected function label($string, array $data = null){
677 676
         $return = isset($this->labels[$string]) ? $this->labels[$string] : $string;
678 677
         if (is_array($data))
679 678
             foreach ($data as $key => $val)
@@ -685,7 +684,7 @@  discard block
 block discarded – undo
685 684
      * @param $message
686 685
      * @param array|null $data
687 686
      */
688
-    protected function backMsg($message, array $data=null) {
687
+    protected function backMsg($message, array $data = null){
689 688
         $message = $this->label($message, $data);
690 689
         if (isset($this->file['tmp_name']) && file_exists($this->file['tmp_name']))
691 690
             @unlink($this->file['tmp_name']);
@@ -697,7 +696,7 @@  discard block
 block discarded – undo
697 696
      * @param $url
698 697
      * @param string $message
699 698
      */
700
-    protected function callBack($url, $message="") {
699
+    protected function callBack($url, $message = ""){
701 700
         $message = text::jsValue($message);
702 701
         $CKfuncNum = isset($this->opener['CKEditor']['funcNum'])
703 702
             ? $this->opener['CKEditor']['funcNum'] : 0;
@@ -741,7 +740,7 @@  discard block
 block discarded – undo
741 740
     /**
742 741
      * @return string
743 742
      */
744
-    protected function get_htaccess() {
743
+    protected function get_htaccess(){
745 744
         return "<IfModule mod_php4.c>
746 745
   php_value engine off
747 746
 </IfModule>
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/core/browser.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             $this->get['dir'] = $dir;
43 43
         }
44 44
 
45
-        $thumbsDir = $this->config['uploadDir'] . "/" . $this->config['thumbsDir'];
45
+        $thumbsDir = $this->config['uploadDir']."/".$this->config['thumbsDir'];
46 46
         if ((
47 47
                 !is_dir($thumbsDir) &&
48 48
                 !@mkdir($thumbsDir, $this->config['dirPerms'])
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $this->session['dir'] = $this->type;
115 115
         } else {
116 116
             $type = $this->getTypeFromPath($this->session['dir']);
117
-            $dir = $this->config['uploadDir'] . "/" . $this->session['dir'];
117
+            $dir = $this->config['uploadDir']."/".$this->session['dir'];
118 118
             if (($type != $this->type) || !is_dir($dir) || !is_readable($dir)) {
119 119
                 $this->session['dir'] = $this->type;
120 120
             }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         }
189 189
         $file = "{$this->thumbsDir}/{$this->type}/{$this->get['dir']}/$file";
190 190
         if (!is_file($file) || !is_readable($file)) {
191
-            $file = "{$this->config['uploadDir']}/{$this->type}/{$this->get['dir']}/" . basename($file);
191
+            $file = "{$this->config['uploadDir']}/{$this->type}/{$this->get['dir']}/".basename($file);
192 192
             if (!is_file($file) || !is_readable($file)) {
193 193
                 $this->sendDefaultThumb($file);
194 194
             }
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     protected function act_chDir()
228 228
     {
229 229
         $this->postDir(); // Just for existing check
230
-        $this->session['dir'] = $this->type . "/" . $this->post['dir'];
230
+        $this->session['dir'] = $this->type."/".$this->post['dir'];
231 231
         $dirWritable = dir::isWritable("{$this->config['uploadDir']}/{$this->session['dir']}");
232 232
 
233 233
         return json_encode(array(
@@ -292,12 +292,12 @@  discard block
 block discarded – undo
292 292
         if (substr($newName, 0, 1) == ".") {
293 293
             $this->errorMsg("Folder name shouldn't begins with '.'");
294 294
         }
295
-        if (!@rename($dir, dirname($dir) . "/$newName")) {
295
+        if (!@rename($dir, dirname($dir)."/$newName")) {
296 296
             $this->errorMsg("Cannot rename the folder.");
297 297
         }
298 298
         $thumbDir = "$this->thumbsTypeDir/{$this->post['dir']}";
299 299
         if (is_dir($thumbDir)) {
300
-            @rename($thumbDir, dirname($thumbDir) . "/$newName");
300
+            @rename($thumbDir, dirname($thumbDir)."/$newName");
301 301
         }
302 302
 
303 303
         return json_encode(array('name' => $newName));
@@ -375,9 +375,9 @@  discard block
 block discarded – undo
375 375
         header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
376 376
         header("Cache-Control: private", false);
377 377
         header("Content-Type: application/octet-stream");
378
-        header('Content-Disposition: attachment; filename="' . str_replace('"', "_", $this->post['file']) . '"');
378
+        header('Content-Disposition: attachment; filename="'.str_replace('"', "_", $this->post['file']).'"');
379 379
         header("Content-Transfer-Encoding:­ binary");
380
-        header("Content-Length: " . filesize($file));
380
+        header("Content-Length: ".filesize($file));
381 381
         readfile($file);
382 382
         die;
383 383
     }
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         $thumbFile = "$thumbDir/{$this->post['file']}";
435 435
 
436 436
         if (file_exists($thumbFile)) {
437
-            @rename($thumbFile, "$thumbDir/" . basename($newName));
437
+            @rename($thumbFile, "$thumbDir/".basename($newName));
438 438
         }
439 439
 
440 440
         return true;
@@ -514,11 +514,11 @@  discard block
 block discarded – undo
514 514
             if (!file_exists($path)) {
515 515
                 $error[] = $this->label("The file '{file}' does not exist.", $replace);
516 516
             } elseif (substr($base, 0, 1) == ".") {
517
-                $error[] = "$base: " . $this->label("File name shouldn't begins with '.'");
517
+                $error[] = "$base: ".$this->label("File name shouldn't begins with '.'");
518 518
             } elseif (!$this->validateExtension($ext, $type)) {
519
-                $error[] = "$base: " . $this->label("Denied file extension.");
519
+                $error[] = "$base: ".$this->label("Denied file extension.");
520 520
             } elseif (file_exists("$dir/$base")) {
521
-                $error[] = "$base: " . $this->label("A file or folder with that name already exists.");
521
+                $error[] = "$base: ".$this->label("A file or folder with that name already exists.");
522 522
             } elseif (!is_readable($path) || !is_file($path)) {
523 523
                 $error[] = $this->label("Cannot read '{file}'.", $replace);
524 524
             } elseif (!@copy($path, "$dir/$base")) {
@@ -578,11 +578,11 @@  discard block
 block discarded – undo
578 578
             if (!file_exists($path)) {
579 579
                 $error[] = $this->label("The file '{file}' does not exist.", $replace);
580 580
             } elseif (substr($base, 0, 1) == ".") {
581
-                $error[] = "$base: " . $this->label("File name shouldn't begins with '.'");
581
+                $error[] = "$base: ".$this->label("File name shouldn't begins with '.'");
582 582
             } elseif (!$this->validateExtension($ext, $type)) {
583
-                $error[] = "$base: " . $this->label("Denied file extension.");
583
+                $error[] = "$base: ".$this->label("Denied file extension.");
584 584
             } elseif (file_exists("$dir/$base")) {
585
-                $error[] = "$base: " . $this->label("A file or folder with that name already exists.");
585
+                $error[] = "$base: ".$this->label("A file or folder with that name already exists.");
586 586
             } elseif (!is_readable($path) || !is_file($path)) {
587 587
                 $error[] = $this->label("Cannot read '{file}'.", $replace);
588 588
             } elseif (!file::isWritable($path) || !@rename($path, "$dir/$base")) {
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
             }
636 636
             $path = "{$this->config['uploadDir']}/$file";
637 637
             $base = basename($file);
638
-            $filepath = str_replace('/' . $base, '', $path);
638
+            $filepath = str_replace('/'.$base, '', $path);
639 639
             $replace = array('file' => $base);
640 640
             if (!is_file($path)) {
641 641
                 $error[] = $this->label("The file '{file}' does not exist.", $replace);
@@ -681,15 +681,15 @@  discard block
 block discarded – undo
681 681
         if (!isset($this->post['dir']) || $this->config['denyZipDownload']) {
682 682
             $this->errorMsg("Unknown error.");
683 683
         }
684
-        $filename = basename($dir) . ".zip";
684
+        $filename = basename($dir).".zip";
685 685
         do {
686
-            $file = md5(time() . session_id());
686
+            $file = md5(time().session_id());
687 687
             $file = "{$this->config['uploadDir']}/$file.zip";
688 688
         } while (file_exists($file));
689 689
         new zipFolder($file, $dir);
690 690
         header("Content-Type: application/x-zip");
691
-        header('Content-Disposition: attachment; filename="' . str_replace('"', "_", $filename) . '"');
692
-        header("Content-Length: " . filesize($file));
691
+        header('Content-Disposition: attachment; filename="'.str_replace('"', "_", $filename).'"');
692
+        header("Content-Length: ".filesize($file));
693 693
         readfile($file);
694 694
         unlink($file);
695 695
         die;
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
         }
724 724
 
725 725
         do {
726
-            $file = md5(time() . session_id());
726
+            $file = md5(time().session_id());
727 727
             $file = "{$this->config['uploadDir']}/$file.zip";
728 728
         } while (file_exists($file));
729 729
 
@@ -736,8 +736,8 @@  discard block
 block discarded – undo
736 736
             $zip->close();
737 737
         }
738 738
         header("Content-Type: application/x-zip");
739
-        header('Content-Disposition: attachment; filename="selected_files_' . basename($file) . '"');
740
-        header("Content-Length: " . filesize($file));
739
+        header('Content-Disposition: attachment; filename="selected_files_'.basename($file).'"');
740
+        header("Content-Length: ".filesize($file));
741 741
         readfile($file);
742 742
         unlink($file);
743 743
         die;
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
             if ($type != $this->type) {
767 767
                 continue;
768 768
             }
769
-            $file = $this->config['uploadDir'] . "/$file";
769
+            $file = $this->config['uploadDir']."/$file";
770 770
             if (!is_file($file) || !is_readable($file)) {
771 771
                 continue;
772 772
             }
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
         }
775 775
 
776 776
         do {
777
-            $file = md5(time() . session_id());
777
+            $file = md5(time().session_id());
778 778
             $file = "{$this->config['uploadDir']}/$file.zip";
779 779
         } while (file_exists($file));
780 780
 
@@ -787,8 +787,8 @@  discard block
 block discarded – undo
787 787
             $zip->close();
788 788
         }
789 789
         header("Content-Type: application/x-zip");
790
-        header('Content-Disposition: attachment; filename="clipboard_' . basename($file) . '"');
791
-        header("Content-Length: " . filesize($file));
790
+        header('Content-Disposition: attachment; filename="clipboard_'.basename($file).'"');
791
+        header("Content-Length: ".filesize($file));
792 792
         readfile($file);
793 793
         unlink($file);
794 794
         die;
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
             return $response;
825 825
         }
826 826
         $filename = $this->normalizeFilename($file['name']);
827
-        $target = "$dir/" . file::getInexistantFilename($filename, $dir);
827
+        $target = "$dir/".file::getInexistantFilename($filename, $dir);
828 828
 
829 829
         if (!@move_uploaded_file($file['tmp_name'], $target) &&
830 830
             !@rename($file['tmp_name'], $target) &&
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
                 if (is_array($size) && count($size)) {
891 891
                     $preview = true;
892 892
                     if (!$this->config['noThumbnailsRecreation']) {
893
-                        $thumb_file = "$thumbDir/" . basename($file);
893
+                        $thumb_file = "$thumbDir/".basename($file);
894 894
                         if (!is_file($thumb_file) || filemtime($file) > filemtime($thumb_file)) {
895 895
                             $this->makeThumb($file);
896 896
                         }
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
             }
908 908
             $name = basename($file);
909 909
             $types = $this->config['types'];
910
-            $types = explode(' ', $types['images'] . ' ' . $types['image']);
910
+            $types = explode(' ', $types['images'].' '.$types['image']);
911 911
             if (substr($name, 0, 1) == '.' && !$this->config['showHiddenFiles']) {
912 912
                 continue;
913 913
             }
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
     {
988 988
         $dir = $this->typeDir;
989 989
         if (isset($this->post['dir'])) {
990
-            $dir .= "/" . $this->post['dir'];
990
+            $dir .= "/".$this->post['dir'];
991 991
         }
992 992
         if ($existent && (!is_dir($dir) || !is_readable($dir))) {
993 993
             $this->errorMsg("Inexistant or inaccessible folder.");
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
     {
1005 1005
         $dir = $this->typeDir;
1006 1006
         if (isset($this->get['dir'])) {
1007
-            $dir .= "/" . $this->get['dir'];
1007
+            $dir .= "/".$this->get['dir'];
1008 1008
         }
1009 1009
         if ($existent && (!is_dir($dir) || !is_readable($dir))) {
1010 1010
             $this->errorMsg("Inexistant or inaccessible folder.");
Please login to merge, or discard this patch.