Completed
Push — develop ( acc675...3313cf )
by Dmytro
12:18
created
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
 include_once(dirname(__FILE__)."/../../../../../assets/cache/siteManager.php");
23 23
 require_once('../../../includes/protect.inc.php');
24 24
 include_once('../../../includes/config.inc.php');
Please login to merge, or discard this patch.
Braces   +25 added lines, -15 removed lines patch added patch discarded remove patch
@@ -41,17 +41,20 @@  discard block
 block discarded – undo
41 41
 $_GET['langCode'] = $modx_lang_attribute;
42 42
 
43 43
 // PHP VERSION CHECK
44
-if (substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.')) < 5)
44
+if (substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.')) < 5) {
45 45
     die("You are using PHP " . PHP_VERSION . " when KCFinder require at least version 5! Some systems has an option to change the active PHP version. Please refer to your hosting provider or upgrade your PHP distribution.");
46
+}
46 47
 
47 48
 
48 49
 // SAFE MODE CHECK
49
-if (ini_get("safe_mode"))
50
+if (ini_get("safe_mode")) {
50 51
     die("The \"safe_mode\" PHP ini setting is turned on! You cannot run KCFinder in safe mode.");
52
+}
51 53
 
52 54
 
53 55
 // MAGIC AUTOLOAD CLASSES FUNCTION
54
-function autoloadda9d06472ccb71b84928677ce2a6ca89($class) {
56
+function autoloadda9d06472ccb71b84928677ce2a6ca89($class)
57
+{
55 58
     static $classes = null;
56 59
     if ($classes === null) {
57 60
         $classes = array(
@@ -84,7 +87,8 @@  discard block
 block discarded – undo
84 87
 // json_encode() IMPLEMENTATION IF JSON EXTENSION IS MISSING
85 88
 if (!function_exists("json_encode")) {
86 89
 
87
-    function kcfinder_json_string_encode($string) {
90
+    function kcfinder_json_string_encode($string)
91
+    {
88 92
         return '"' .
89 93
             str_replace('/', "\\/",
90 94
             str_replace("\t", "\\t",
@@ -95,37 +99,43 @@  discard block
 block discarded – undo
95 99
         $string)))))) . '"';
96 100
     }
97 101
 
98
-    function json_encode($data) {
102
+    function json_encode($data)
103
+    {
99 104
 
100 105
         if (is_array($data)) {
101 106
             $ret = array();
102 107
 
103 108
             // OBJECT
104 109
             if (array_keys($data) !== range(0, count($data) - 1)) {
105
-                foreach ($data as $key => $val)
106
-                    $ret[] = kcfinder_json_string_encode($key) . ':' . json_encode($val);
110
+                foreach ($data as $key => $val) {
111
+                                    $ret[] = kcfinder_json_string_encode($key) . ':' . json_encode($val);
112
+                }
107 113
                 return "{" . implode(",", $ret) . "}";
108 114
 
109 115
             // ARRAY
110 116
             } else {
111
-                foreach ($data as $val)
112
-                    $ret[] = json_encode($val);
117
+                foreach ($data as $val) {
118
+                                    $ret[] = json_encode($val);
119
+                }
113 120
                 return "[" . implode(",", $ret) . "]";
114 121
             }
115 122
 
116 123
         // BOOLEAN OR NULL
117
-        } elseif (is_bool($data) || ($data === null))
118
-            return ($data === null)
124
+        } elseif (is_bool($data) || ($data === null)) {
125
+                    return ($data === null)
119 126
                 ? "null"
120 127
                 : ($data ? "true" : "false");
128
+        }
121 129
 
122 130
         // FLOAT
123
-        elseif (is_float($data))
124
-            return rtrim(rtrim(number_format($data, 14, ".", ""), "0"), ".");
131
+        elseif (is_float($data)) {
132
+                    return rtrim(rtrim(number_format($data, 14, ".", ""), "0"), ".");
133
+        }
125 134
 
126 135
         // INTEGER
127
-        elseif (is_int($data))
128
-            return $data;
136
+        elseif (is_int($data)) {
137
+                    return $data;
138
+        }
129 139
 
130 140
         // STRING
131 141
         return kcfinder_json_string_encode($data);
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 $modx = evolutionCMS();
27 27
 $modx->db->connect();
28 28
 startCMSSession();
29
-if(!isset($_SESSION['mgrValidated'])) {
29
+if (!isset($_SESSION['mgrValidated'])) {
30 30
         die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
31 31
 }
32 32
 define('IN_MANAGER_MODE', true);
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 $manager_language = $modx->config['manager_language'];
36 36
 // Pass language code from MODX to KCFinder
37
-if(!file_exists("../../../includes/lang/".$manager_language.".inc.php")) {
37
+if (!file_exists("../../../includes/lang/".$manager_language.".inc.php")) {
38 38
     $manager_language = "english"; // if not set, get the english language file.
39 39
 }
40 40
 include_once "../../../includes/lang/".$manager_language.".inc.php";
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 // PHP VERSION CHECK
44 44
 if (substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.')) < 5)
45
-    die("You are using PHP " . PHP_VERSION . " when KCFinder require at least version 5! Some systems has an option to change the active PHP version. Please refer to your hosting provider or upgrade your PHP distribution.");
45
+    die("You are using PHP ".PHP_VERSION." when KCFinder require at least version 5! Some systems has an option to change the active PHP version. Please refer to your hosting provider or upgrade your PHP distribution.");
46 46
 
47 47
 
48 48
 // SAFE MODE CHECK
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 
53 53
 // MAGIC AUTOLOAD CLASSES FUNCTION
54
-function autoloadda9d06472ccb71b84928677ce2a6ca89($class) {
54
+function autoloadda9d06472ccb71b84928677ce2a6ca89($class){
55 55
     static $classes = null;
56 56
     if ($classes === null) {
57 57
         $classes = array(
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         );
76 76
     }
77 77
     if (isset($classes[$class])) {
78
-        require dirname(__FILE__) . $classes[$class];
78
+        require dirname(__FILE__).$classes[$class];
79 79
     }
80 80
 }
81 81
 spl_autoload_register('autoloadda9d06472ccb71b84928677ce2a6ca89', true);
@@ -84,18 +84,18 @@  discard block
 block discarded – undo
84 84
 // json_encode() IMPLEMENTATION IF JSON EXTENSION IS MISSING
85 85
 if (!function_exists("json_encode")) {
86 86
 
87
-    function kcfinder_json_string_encode($string) {
88
-        return '"' .
87
+    function kcfinder_json_string_encode($string){
88
+        return '"'.
89 89
             str_replace('/', "\\/",
90 90
             str_replace("\t", "\\t",
91 91
             str_replace("\r", "\\r",
92 92
             str_replace("\n", "\\n",
93 93
             str_replace('"', "\\\"",
94 94
             str_replace("\\", "\\\\",
95
-        $string)))))) . '"';
95
+        $string)))))).'"';
96 96
     }
97 97
 
98
-    function json_encode($data) {
98
+    function json_encode($data){
99 99
 
100 100
         if (is_array($data)) {
101 101
             $ret = array();
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
             // OBJECT
104 104
             if (array_keys($data) !== range(0, count($data) - 1)) {
105 105
                 foreach ($data as $key => $val)
106
-                    $ret[] = kcfinder_json_string_encode($key) . ':' . json_encode($val);
107
-                return "{" . implode(",", $ret) . "}";
106
+                    $ret[] = kcfinder_json_string_encode($key).':'.json_encode($val);
107
+                return "{".implode(",", $ret)."}";
108 108
 
109 109
             // ARRAY
110 110
             } else {
111 111
                 foreach ($data as $val)
112 112
                     $ret[] = json_encode($val);
113
-                return "[" . implode(",", $ret) . "]";
113
+                return "[".implode(",", $ret)."]";
114 114
             }
115 115
 
116 116
         // BOOLEAN OR NULL
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/tpl/tpl_css.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1
-<link href="css.php?type=<?php echo $this->type ?><?php echo ($this->cms ? "&amp;cms={$this->cms}" : "" ) ?>" rel="stylesheet" type="text/css" />
1
+<link href="css.php?type=<?php echo $this->type ?><?php echo ($this->cms ? "&amp;cms={$this->cms}" : "") ?>" rel="stylesheet" type="text/css" />
2 2
 <link href="themes/<?php echo $this->config['theme'] ?>/style.css" rel="stylesheet" type="text/css" />
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
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
4 4
 <script src="js/helper.js" type="text/javascript"></script>
5 5
 <script src="js/browser/joiner.php" type="text/javascript"></script>
6 6
 <script src="js_localize.php?lng=<?php echo $this->lang ?>" type="text/javascript"></script>
7
-<?php IF (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
7
+<?php if (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
8 8
 <script src="<?php echo $this->config['_tinyMCEPath'] ?>/tiny_mce_popup.js" type="text/javascript"></script>
9
-<?php ENDIF ?>
10
-<?php IF (file_exists("themes/{$this->config['theme']}/init.js")): ?>
9
+<?php endif ?>
10
+<?php if (file_exists("themes/{$this->config['theme']}/init.js")): ?>
11 11
 <script src="themes/<?php echo $this->config['theme'] ?>/init.js" type="text/javascript"></script>
12
-<?php ENDIF ?>
12
+<?php endif ?>
13 13
 <script type="text/javascript">
14 14
 browser.version = "<?php echo self::VERSION ?>";
15 15
 browser.support.chromeFrame = <?php echo (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), " chromeframe") !== false) ? "true" : "false" ?>;
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
 browser.siteURL = "<?php echo text::jsValue($this->config['siteURL']) ?>";
24 24
 browser.assetsURL = "<?php echo text::jsValue($this->config['assetsURL']) ?>";
25 25
 browser.thumbsURL = browser.assetsURL + "/<?php echo text::jsValue($this->config['thumbsDir']) ?>";
26
-<?php IF (isset($this->get['opener']) && strlen($this->get['opener'])): ?>
26
+<?php if (isset($this->get['opener']) && strlen($this->get['opener'])): ?>
27 27
 browser.opener.name = "<?php echo text::jsValue($this->get['opener']) ?>";
28
-<?php ENDIF ?>
29
-<?php IF (isset($this->opener['CKEditor']['funcNum']) && preg_match('/^\d+$/', $this->opener['CKEditor']['funcNum'])): ?>
28
+<?php endif ?>
29
+<?php if (isset($this->opener['CKEditor']['funcNum']) && preg_match('/^\d+$/', $this->opener['CKEditor']['funcNum'])): ?>
30 30
 browser.opener.CKEditor = {};
31 31
 browser.opener.CKEditor.funcNum = <?php echo $this->opener['CKEditor']['funcNum'] ?>;
32
-<?php ENDIF ?>
33
-<?php IF (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
32
+<?php endif ?>
33
+<?php if (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
34 34
 browser.opener.TinyMCE = true;
35
-<?php ENDIF ?>
36
-<?php IF (isset($this->get['opener']) && ($this->get['opener'] == "tinymce4") && isset($this->get['field'])): ?>
35
+<?php endif ?>
36
+<?php if (isset($this->get['opener']) && ($this->get['opener'] == "tinymce4") && isset($this->get['field'])): ?>
37 37
 browser.opener.TinyMCE4 = "<?= text::jsValue($this->get['field']) ?>";
38
-<?php ENDIF ?>
38
+<?php endif ?>
39 39
 browser.cms = "<?php echo text::jsValue($this->cms) ?>";
40 40
 _.kuki.domain = "<?php echo text::jsValue($this->config['cookieDomain']) ?>";
41 41
 _.kuki.path = "<?php echo text::jsValue($this->config['cookiePath']) ?>";
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/tpl/tpl_browser.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 <head>
5 5
     <title>KCFinder: /
6 6
         <?php echo $this->session['dir'] ?></title>
7
-    <?php INCLUDE "tpl/tpl_css.php" ?>
8
-    <?php INCLUDE "tpl/tpl_javascript.php" ?>
7
+    <?php include "tpl/tpl_css.php" ?>
8
+    <?php include "tpl/tpl_javascript.php" ?>
9 9
 </head>
10 10
 
11 11
 <body>
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lang/pt-br.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** Portugues Brasil localization file for KCFinder
4
-  * author: Alexandre Benegas Ferreira
5
-  * country: Brasil
6
-  * company website: www.hostcataratas.com.br
7
-  * e-mail: [email protected]
8
-  */
4
+ * author: Alexandre Benegas Ferreira
5
+ * country: Brasil
6
+ * company website: www.hostcataratas.com.br
7
+ * e-mail: [email protected]
8
+ */
9 9
 
10 10
 $lang = array(
11 11
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 
10 10
 $lang = array(
11 11
 
12
-    '_locale' => "pt_BR.UTF-8",  // UNIX localization code
13
-    '_charset' => "utf-8",       // Browser charset
12
+    '_locale' => "pt_BR.UTF-8", // UNIX localization code
13
+    '_charset' => "utf-8", // Browser charset
14 14
 
15 15
     // Date time formats. See http://www.php.net/manual/en/function.strftime.php
16 16
     '_dateTimeFull' => "%A, %e %B, %Y %H:%M",
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lang/de.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** German localization file for KCFinder
4
-  * author: Tim Wahrendorff <[email protected]>
5
-  */
4
+ * author: Tim Wahrendorff <[email protected]>
5
+ */
6 6
 
7 7
 $lang = array(
8 8
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 
7 7
 $lang = array(
8 8
 
9
-    '_locale' => "de_DE.UTF-8",  // UNIX localization code
10
-    '_charset' => "utf-8",       // Browser charset
9
+    '_locale' => "de_DE.UTF-8", // UNIX localization code
10
+    '_charset' => "utf-8", // Browser charset
11 11
 
12 12
     // Date time formats. See http://www.php.net/manual/en/function.strftime.php
13 13
     '_dateTimeFull' => "%A, %e.%B.%Y %I:%M %p",
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lang/uk.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** Ukrainian localization file for KCFinder
4
-	* author: Myroslav Dobra
5
-	* E-mail: [email protected]
6
-  */
4
+ * author: Myroslav Dobra
5
+ * E-mail: [email protected]
6
+ */
7 7
 
8 8
 $lang = array(
9 9
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 
8 8
 $lang = array(
9 9
 
10
-    '_locale' => "uk_UA.UTF-8",  // UNIX localization code
11
-    '_charset' => "utf-8",       // Browser charset
10
+    '_locale' => "uk_UA.UTF-8", // UNIX localization code
11
+    '_charset' => "utf-8", // Browser charset
12 12
 
13 13
     // Date time formats. See http://www.php.net/manual/en/function.strftime.php
14 14
     '_dateTimeFull' => "%A, %e %B, %Y %H:%M",
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lang/ja.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  * @desc Japanese localization
6
-  * @package KCFinder
7
-  * @author yama [email protected]
8
-  * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
9
-  * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
10
-  */
4
+ *
5
+ * @desc Japanese localization
6
+ * @package KCFinder
7
+ * @author yama [email protected]
8
+ * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
9
+ * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
10
+ */
11 11
 
12 12
 $lang = array(
13 13
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 
12 12
 $lang = array(
13 13
 
14
-    '_locale' => "ja_JP.UTF-8",  // UNIX localization code
15
-    '_charset' => "utf-8",       // Browser charset
14
+    '_locale' => "ja_JP.UTF-8", // UNIX localization code
15
+    '_charset' => "utf-8", // Browser charset
16 16
 
17 17
     // Date time formats. See http://www.php.net/manual/en/function.strftime.php
18 18
     '_dateTimeFull' => "%Y/%m/%d %H:%M",
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lang/fr.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** French localization file for KCFinder
4
-  * author: Damien Barrère
5
-  * update: Samuel Jobard
6
-  */
4
+ * author: Damien Barrère
5
+ * update: Samuel Jobard
6
+ */
7 7
 
8 8
 $lang = array(
9 9
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 
8 8
 $lang = array(
9 9
 
10
-    '_locale' => "fr_FR.UTF-8",  // UNIX localization code
11
-    '_charset' => "utf-8",       // Browser charset
10
+    '_locale' => "fr_FR.UTF-8", // UNIX localization code
11
+    '_charset' => "utf-8", // Browser charset
12 12
 
13 13
     // Date time formats. See http://www.php.net/manual/en/function.strftime.php
14 14
     '_dateTimeFull' => "%A %e %B %Y %H:%M",
Please login to merge, or discard this patch.