Completed
Pull Request — develop (#740)
by Maxim
08:32
created
manager/includes/secure_web_documents.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@
 block discarded – undo
20 20
         ($docid > 0 ? "id='$docid'" : "privateweb = 1"));
21 21
     $rs = $modx->getDatabase()->select(
22 22
         'DISTINCT sc.id',
23
-        $modx->getDatabase()->getFullTableName("site_content") . " sc
24
-			LEFT JOIN " . $modx->getDatabase()->getFullTableName("document_groups") . " dg ON dg.document = sc.id
25
-			LEFT JOIN " . $modx->getDatabase()->getFullTableName("webgroup_access") . " wga ON wga.documentgroup = dg.document_group",
26
-        ($docid > 0 ? " sc.id='{$docid}' AND " : "") . "wga.id>0"
23
+        $modx->getDatabase()->getFullTableName("site_content")." sc
24
+			LEFT JOIN " . $modx->getDatabase()->getFullTableName("document_groups")." dg ON dg.document = sc.id
25
+			LEFT JOIN " . $modx->getDatabase()->getFullTableName("webgroup_access")." wga ON wga.documentgroup = dg.document_group",
26
+        ($docid > 0 ? " sc.id='{$docid}' AND " : "")."wga.id>0"
27 27
     );
28 28
     $ids = $modx->getDatabase()->getColumn("id", $rs);
29 29
     if (count($ids) > 0) {
30 30
         $modx->getDatabase()->update('privateweb = 1', $modx->getDatabase()->getFullTableName("site_content"),
31
-            "id IN (" . implode(", ", $ids) . ")");
31
+            "id IN (".implode(", ", $ids).")");
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
manager/includes/mutate_settings.ajax.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
7 7
 }
8 8
 
9
-require_once(dirname(__FILE__) . '/protect.inc.php');
9
+require_once(dirname(__FILE__).'/protect.inc.php');
10 10
 
11 11
 $action = preg_replace('/[^A-Za-z0-9_\-\.\/]/', '', $_POST['action']);
12 12
 $lang = preg_replace('/[^A-Za-z0-9_\s\+\-\.\/]/', '', $_POST['lang']);
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 
24 24
 switch (true) {
25 25
     case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/',
26
-            $lang) && file_exists(dirname(__FILE__) . '/lang/' . $lang . '.inc.php')): {
27
-        include(dirname(__FILE__) . '/lang/' . $lang . '.inc.php');
26
+            $lang) && file_exists(dirname(__FILE__).'/lang/'.$lang.'.inc.php')): {
27
+        include(dirname(__FILE__).'/lang/'.$lang.'.inc.php');
28 28
         $str = isset($key, $_lang, $_lang[$key]) ? $_lang[$key] : "";
29 29
         break;
30 30
     }
31 31
     case ($action == 'setsetting' && !empty($key) && !empty($value)): {
32
-        $sql = "REPLACE INTO " . $modx->getDatabase()->getFullTableName("system_settings") . " (setting_name, setting_value) VALUES('{$key}', '{$value}');";
32
+        $sql = "REPLACE INTO ".$modx->getDatabase()->getFullTableName("system_settings")." (setting_name, setting_value) VALUES('{$key}', '{$value}');";
33 33
         $str = "true";
34 34
         $modx->getDatabase()->query($sql);
35 35
         $emptyCache = true;
Please login to merge, or discard this patch.
manager/includes/extenders/modifiers/mdf_memberof.inc.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,29 +2,29 @@
 block discarded – undo
2 2
 $userID = abs($modx->getLoginUserID('web'));
3 3
 $modx->qs_hash = md5($modx->qs_hash."^{$userID}^");
4 4
 
5
-$groupNames = ($this->strlen($opt) > 0 ) ? explode(',',$opt) : array();
5
+$groupNames = ($this->strlen($opt) > 0) ? explode(',', $opt) : array();
6 6
 
7 7
 // if $groupNames is not an array return false
8
-if(!is_array($groupNames)) return 0;
8
+if (!is_array($groupNames)) return 0;
9 9
 
10 10
 // Creates an array with all webgroups the user id is in
11 11
 if (isset($modx->getModifiers()->cache['mo'][$userID])) $grpNames = $modx->getModifiers()->cache['mo'][$userID];
12 12
 else {
13 13
     $from = sprintf(
14
-        $modx->getDatabase()->getFullTableName('webgroup_names') .
15
-        " wgn INNER JOIN " .
16
-        $modx->getDatabase()->getFullTableName('web_groups') .
14
+        $modx->getDatabase()->getFullTableName('webgroup_names').
15
+        " wgn INNER JOIN ".
16
+        $modx->getDatabase()->getFullTableName('web_groups').
17 17
         " wg ON wg.webgroup=wgn.id AND wg.webuser='%s'",
18 18
 
19 19
         $userID
20 20
     );
21
-    $rs = $modx->getDatabase()->select('wgn.name',$from);
22
-    $modx->getModifiers()->cache['mo'][$userID] = $grpNames = $modx->getDatabase()->getColumn('name',$rs);
21
+    $rs = $modx->getDatabase()->select('wgn.name', $from);
22
+    $modx->getModifiers()->cache['mo'][$userID] = $grpNames = $modx->getDatabase()->getColumn('name', $rs);
23 23
 }
24 24
 
25 25
 // Check if a supplied group matches a webgroup from the array we just created
26
-foreach($groupNames as $k=>$v) {
27
-    if(in_array(trim($v),$grpNames)) return 1;
26
+foreach ($groupNames as $k=>$v) {
27
+    if (in_array(trim($v), $grpNames)) return 1;
28 28
 }
29 29
 
30 30
 // If we get here the above logic did not find a match, so return false
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,11 +5,14 @@  discard block
 block discarded – undo
5 5
 $groupNames = ($this->strlen($opt) > 0 ) ? explode(',',$opt) : array();
6 6
 
7 7
 // if $groupNames is not an array return false
8
-if(!is_array($groupNames)) return 0;
8
+if(!is_array($groupNames)) {
9
+    return 0;
10
+}
9 11
 
10 12
 // Creates an array with all webgroups the user id is in
11
-if (isset($modx->getModifiers()->cache['mo'][$userID])) $grpNames = $modx->getModifiers()->cache['mo'][$userID];
12
-else {
13
+if (isset($modx->getModifiers()->cache['mo'][$userID])) {
14
+    $grpNames = $modx->getModifiers()->cache['mo'][$userID];
15
+} else {
13 16
     $from = sprintf(
14 17
         $modx->getDatabase()->getFullTableName('webgroup_names') .
15 18
         " wgn INNER JOIN " .
@@ -24,8 +27,10 @@  discard block
 block discarded – undo
24 27
 
25 28
 // Check if a supplied group matches a webgroup from the array we just created
26 29
 foreach($groupNames as $k=>$v) {
27
-    if(in_array(trim($v),$grpNames)) return 1;
28
-}
30
+    if(in_array(trim($v),$grpNames)) {
31
+        return 1;
32
+    }
33
+    }
29 34
 
30 35
 // If we get here the above logic did not find a match, so return false
31 36
 return 0;
Please login to merge, or discard this patch.
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/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/media/browser/mcpuk/core/browser.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
     }
442 442
 
443 443
     /**
444
-     * @return bool
444
+     * @return null|boolean
445 445
      */
446 446
     protected function act_delete()
447 447
     {
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
 
797 797
     /**
798 798
      * @param $file
799
-     * @param $dir
799
+     * @param string $dir
800 800
      * @return string
801 801
      */
802 802
     protected function moveUploadFile($file, $dir)
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
     }
852 852
 
853 853
     /**
854
-     * @param null $file
854
+     * @param string $file
855 855
      */
856 856
     protected function sendDefaultThumb($file = null)
857 857
     {
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
     }
1103 1103
 
1104 1104
     /**
1105
-     * @param $message
1105
+     * @param string $message
1106 1106
      * @param array|null $data
1107 1107
      */
1108 1108
     protected function errorMsg($message, array $data = null)
Please login to merge, or discard this 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.
manager/media/browser/mcpuk/config.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
     'maxImageWidth'  => $modx->config['maxImageWidth'],
73 73
     'maxImageHeight' => $modx->config['maxImageHeight'],
74 74
     'clientResize'   => $modx->config['clientResize'] && $modx->config['maxImageWidth'] && $modx->config['maxImageHeight'] ? array('maxWidth'  => $modx->config['maxImageWidth'],
75
-                                                                                                                                   'maxHeight' => $modx->config['maxImageHeight'],
76
-                                                                                                                                   'quality'   => $modx->config['jpegQuality'] / 100
75
+                                                                                                                                    'maxHeight' => $modx->config['maxImageHeight'],
76
+                                                                                                                                    'quality'   => $modx->config['jpegQuality'] / 100
77 77
     ) : array(),
78 78
 
79 79
     'thumbWidth'  => $modx->config['thumbWidth'],
Please login to merge, or discard this 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/tpl/tpl_javascript.php 1 patch
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 <script src="js/FileAPI/FileAPI.exif.js" type="text/javascript"></script>
8 8
 <script src="js/browser/joiner.php" type="text/javascript"></script>
9 9
 <script src="js_localize.php?lng=<?php echo $this->lang ?>" type="text/javascript"></script>
10
-<?php IF (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
10
+<?php if (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
11 11
 <script src="<?php echo $this->config['_tinyMCEPath'] ?>/tiny_mce_popup.js" type="text/javascript"></script>
12
-<?php ENDIF ?>
13
-<?php IF (file_exists("themes/{$this->config['theme']}/init.js")): ?>
12
+<?php endif ?>
13
+<?php if (file_exists("themes/{$this->config['theme']}/init.js")): ?>
14 14
 <script src="themes/<?php echo $this->config['theme'] ?>/init.js" type="text/javascript"></script>
15
-<?php ENDIF ?>
15
+<?php endif ?>
16 16
 <script type="text/javascript">
17 17
 browser.version = "<?php echo self::VERSION ?>";
18 18
 browser.support.chromeFrame = <?php echo (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), " chromeframe") !== false) ? "true" : "false" ?>;
@@ -29,19 +29,19 @@  discard block
 block discarded – undo
29 29
 browser.allowedExts = /<?php echo str_replace(' ', '|', strtolower(text::clearWhitespaces($this->types[$this->type]))) ?>$/;
30 30
 browser.deniedExts = /<?php echo str_replace(' ', '|', strtolower(text::clearWhitespaces($this->config['deniedExts']))) ?>$/;
31 31
 browser.maxFileSize = <?php echo text::jsValue($this->config['maxfilesize']) ?>;
32
-<?php IF (isset($this->get['opener']) && strlen($this->get['opener'])): ?>
32
+<?php if (isset($this->get['opener']) && strlen($this->get['opener'])): ?>
33 33
 browser.opener.name = "<?php echo text::jsValue($this->get['opener']) ?>";
34
-<?php ENDIF ?>
35
-<?php IF (isset($this->opener['CKEditor']['funcNum']) && preg_match('/^\d+$/', $this->opener['CKEditor']['funcNum'])): ?>
34
+<?php endif ?>
35
+<?php if (isset($this->opener['CKEditor']['funcNum']) && preg_match('/^\d+$/', $this->opener['CKEditor']['funcNum'])): ?>
36 36
 browser.opener.CKEditor = {};
37 37
 browser.opener.CKEditor.funcNum = <?php echo $this->opener['CKEditor']['funcNum'] ?>;
38
-<?php ENDIF ?>
39
-<?php IF (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
38
+<?php endif ?>
39
+<?php if (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
40 40
 browser.opener.TinyMCE = true;
41
-<?php ENDIF ?>
42
-<?php IF (isset($this->get['opener']) && ($this->get['opener'] == "tinymce4") && isset($this->get['field'])): ?>
41
+<?php endif ?>
42
+<?php if (isset($this->get['opener']) && ($this->get['opener'] == "tinymce4") && isset($this->get['field'])): ?>
43 43
 browser.opener.TinyMCE4 = "<?= text::jsValue($this->get['field']) ?>";
44
-<?php ENDIF ?>
44
+<?php endif ?>
45 45
 browser.cms = "<?php echo text::jsValue($this->cms) ?>";
46 46
 _.kuki.domain = "<?php echo text::jsValue($this->config['cookieDomain']) ?>";
47 47
 _.kuki.path = "<?php echo text::jsValue($this->config['cookiePath']) ?>";
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/core/autoload.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc This file is included first, before each other
6
-  *   @package KCFinder
7
-  *   @version 2.54
8
-  *    @author Pavel Tzonkov <[email protected]>
9
-  * @copyright 2010-2014 KCFinder Project
10
-  *   @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
11
-  *   @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
12
-  *      @link http://kcfinder.sunhater.com
13
-  *
14
-  * This file is the place you can put any code (at the end of the file),
15
-  * which will be executed before any other. Suitable for:
16
-  *     1. Set PHP ini settings using ini_set()
17
-  *     2. Custom session save handler with session_set_save_handler()
18
-  *     3. Any custom integration code. If you use any global variables
19
-  *        here, they can be accessed in config.php via $GLOBALS array.
20
-  *        It's recommended to use constants instead.
21
-  */
4
+ *
5
+ *      @desc This file is included first, before each other
6
+ *   @package KCFinder
7
+ *   @version 2.54
8
+ *    @author Pavel Tzonkov <[email protected]>
9
+ * @copyright 2010-2014 KCFinder Project
10
+ *   @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
11
+ *   @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
12
+ *      @link http://kcfinder.sunhater.com
13
+ *
14
+ * This file is the place you can put any code (at the end of the file),
15
+ * which will be executed before any other. Suitable for:
16
+ *     1. Set PHP ini settings using ini_set()
17
+ *     2. Custom session save handler with session_set_save_handler()
18
+ *     3. Any custom integration code. If you use any global variables
19
+ *        here, they can be accessed in config.php via $GLOBALS array.
20
+ *        It's recommended to use constants instead.
21
+ */
22 22
 define('IN_MANAGER_MODE', true);
23 23
 define('MODX_API_MODE', true);
24 24
 include_once(__DIR__."/../../../../../index.php");
Please login to merge, or discard this 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.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@
 block discarded – undo
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 43
     static $classes = null;
43 44
     if ($classes === null) {
44 45
         $classes = array(
Please login to merge, or discard this patch.