Completed
Push — develop ( 923a1c...1e9876 )
by Maxim
47s queued 29s
created
manager/media/browser/mcpuk/lib/class_fastImage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 					{
151 151
 						$state = 'skipframe';
152 152
 					}
153
-					elseif (in_array($b, array_merge(range(0xC0,0xC3), range(0xC5,0xC7), range(0xC9,0xCB), range(0xCD,0xCF))))
153
+					elseif (in_array($b, array_merge(range(0xC0, 0xC3), range(0xC5, 0xC7), range(0xC9, 0xCB), range(0xCD, 0xCF))))
154 154
 					{
155 155
 						$state = 'readsize';
156 156
 					}
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$response = null;
189 189
 
190 190
 		// do we need more data?
191
-		if ($this->strpos + $n -1 >= strlen($this->str))
191
+		if ($this->strpos + $n - 1 >= strlen($this->str))
192 192
 		{
193 193
 			$end = ($this->strpos + $n);
194 194
 
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/helper_httpCache.php 1 patch
Spacing   +6 added lines, -6 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 httpCache {
15
+class httpCache{
16 16
     const DEFAULT_TYPE = "text/html";
17 17
     const DEFAULT_EXPIRE = 604800; // in seconds
18 18
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     * @param integer $expire
26 26
     * @param array $headers */
27 27
 
28
-    static function file($file, $type=null, $expire=null, array $headers=null) {
28
+    static function file($file, $type = null, $expire = null, array $headers = null){
29 29
         $mtime = @filemtime($file);
30 30
         if ($mtime !== false) self::checkMTime($mtime);
31 31
 
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
     * @param array $headers
48 48
     * @param bool $checkMTime */
49 49
 
50
-    static function content($content, $mtime, $type=null, $expire=null, array $headers=null, $checkMTime=true) {
50
+    static function content($content, $mtime, $type = null, $expire = null, array $headers = null, $checkMTime = true){
51 51
         if ($checkMTime) self::checkMTime($mtime);
52 52
         if ($type === null) $type = self::DEFAULT_TYPE;
53 53
         if ($expire === null) $expire = self::DEFAULT_EXPIRE;
54 54
         $size = strlen($content);
55
-        $expires = gmdate("D, d M Y H:i:s", time() + $expire) . " GMT";
55
+        $expires = gmdate("D, d M Y H:i:s", time() + $expire)." GMT";
56 56
         header("Content-Type: $type");
57 57
         header("Expires: $expires");
58 58
         header("Cache-Control: max-age=$expire");
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
     * the PHP to be configured as Apache module.
69 69
     * @param integer $mtime */
70 70
 
71
-    static function checkMTime($mtime, $sendHeaders=null) {
72
-        header("Last-Modified: " . gmdate("D, d M Y H:i:s", $mtime) . " GMT");
71
+    static function checkMTime($mtime, $sendHeaders = null){
72
+        header("Last-Modified: ".gmdate("D, d M Y H:i:s", $mtime)." GMT");
73 73
 
74 74
         $headers = function_exists("getallheaders")
75 75
             ? getallheaders()
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/class_image_gd.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
   *      @link http://kcfinder.sunhater.com
13 13
   */
14 14
 
15
-class image_gd extends image {
15
+class image_gd extends image{
16 16
 
17 17
 
18 18
     // ABSTRACT PUBLIC METHODS
19 19
 
20
-    public function resize($width, $height) {
20
+    public function resize($width, $height){
21 21
         if (!$width) $width = 1;
22 22
         if (!$height) $height = 1;
23 23
         return (
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         );
30 30
     }
31 31
 
32
-    public function resizeFit($width, $height, $background=false) {
32
+    public function resizeFit($width, $height, $background = false){
33 33
         if ((!$width && !$height) || (($width == $this->width) && ($height == $this->height)))
34 34
             return true;
35 35
         if (!$width || (($height / $width) < ($this->height / $this->width))) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         }
68 68
     }
69 69
 
70
-    public function resizeCrop($width, $height, $offset=false) {
70
+    public function resizeCrop($width, $height, $offset = false){
71 71
 
72 72
         if (($this->width / $this->height) > ($width / $height)) {
73 73
             $h = $height;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         return $return;
118 118
     }
119 119
 
120
-    public function rotate($angle, $background="#000000") {
120
+    public function rotate($angle, $background = "#000000"){
121 121
         $angle = -$angle;
122 122
         $img = @imagerotate($this->image, $angle, $this->gdColor($background));
123 123
         if ($img === false)
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         return true;
129 129
     }
130 130
 
131
-    public function flipHorizontal() {
131
+    public function flipHorizontal(){
132 132
         $img = imagecreatetruecolor($this->width, $this->height);
133 133
             imagealphablending($img, false);
134 134
             imagesavealpha($img, true);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         return true;
140 140
     }
141 141
 
142
-    public function flipVertical() {
142
+    public function flipVertical(){
143 143
         $img = imagecreatetruecolor($this->width, $this->height);
144 144
             imagealphablending($img, false);
145 145
             imagesavealpha($img, true);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         return true;
151 151
     }
152 152
 
153
-    public function watermark($file, $left=false, $top=false) {
153
+    public function watermark($file, $left = false, $top = false){
154 154
         $info = getimagesize($file);
155 155
         list($w, $h, $t) = $info;
156 156
         if (!in_array($t, array(IMAGETYPE_PNG, IMAGETYPE_GIF)))
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         return true;
188 188
     }
189 189
 
190
-    public function output($type='jpeg', array $options=array()) {
190
+    public function output($type = 'jpeg', array $options = array()){
191 191
         $method = "output_$type";
192 192
         if (!method_exists($this, $method))
193 193
             return false;
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
     // ABSTRACT PROTECTED METHODS
199 199
 
200
-    protected function getBlankImage($width, $height) {
200
+    protected function getBlankImage($width, $height){
201 201
         $img = @imagecreatetruecolor($width, $height);
202 202
 //        imagealphablending($img, false);
203 203
 //        imagesavealpha($img, true);
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         return $img;
208 208
     }
209 209
 
210
-    protected function getImage($image, &$width, &$height) {
210
+    protected function getImage($image, &$width, &$height){
211 211
 
212 212
         if (is_resource($image) && (get_resource_type($image) == "gd")) {
213 213
             $width = @imagesx($image);
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
             (false !== (list($width, $height, $t) = @getimagesize($image)))
219 219
         ) {
220 220
             $image =
221
-                ($t == IMAGETYPE_GIF)  ? @imagecreatefromgif($image)  : (
221
+                ($t == IMAGETYPE_GIF) ? @imagecreatefromgif($image) : (
222 222
                 ($t == IMAGETYPE_WBMP) ? @imagecreatefromwbmp($image) : (
223 223
                 ($t == IMAGETYPE_JPEG) ? @imagecreatefromjpeg($image) : (
224
-                ($t == IMAGETYPE_PNG)  ? @imagecreatefrompng($image)  : (
225
-                ($t == IMAGETYPE_XBM)  ? @imagecreatefromxbm($image)  : false
224
+                ($t == IMAGETYPE_PNG) ? @imagecreatefrompng($image) : (
225
+                ($t == IMAGETYPE_XBM) ? @imagecreatefromxbm($image) : false
226 226
             ))));
227 227
 
228 228
             return $image;
@@ -234,22 +234,22 @@  discard block
 block discarded – undo
234 234
 
235 235
     // PSEUDO-ABSTRACT STATIC METHODS
236 236
 
237
-    static function available() {
237
+    static function available(){
238 238
         return function_exists("imagecreatefromjpeg");
239 239
     }
240 240
 
241
-    static function checkImage($file) {
241
+    static function checkImage($file){
242 242
         if (!is_string($file) ||
243 243
             ((false === (list($width, $height, $t) = @getimagesize($file))))
244 244
         )
245 245
             return false;
246 246
 
247 247
         $img =
248
-            ($t == IMAGETYPE_GIF)  ? @imagecreatefromgif($file)  : (
248
+            ($t == IMAGETYPE_GIF) ? @imagecreatefromgif($file) : (
249 249
             ($t == IMAGETYPE_WBMP) ? @imagecreatefromwbmp($file) : (
250 250
             ($t == IMAGETYPE_JPEG) ? @imagecreatefromjpeg($file) : (
251
-            ($t == IMAGETYPE_PNG)  ? @imagecreatefrompng($file)  : (
252
-            ($t == IMAGETYPE_XBM)  ? @imagecreatefromxbm($file)  : false
251
+            ($t == IMAGETYPE_PNG) ? @imagecreatefrompng($file) : (
252
+            ($t == IMAGETYPE_XBM) ? @imagecreatefromxbm($file) : false
253 253
         ))));
254 254
 
255 255
         return ($img !== false);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
     // OWN METHODS
260 260
 
261
-    protected function output_png(array $options=array()) {
261
+    protected function output_png(array $options = array()){
262 262
         $file = isset($options['file']) ? $options['file'] : null;
263 263
         $quality = isset($options['quality']) ? $options['quality'] : null;
264 264
         $filters = isset($options['filters']) ? $options['filters'] : null;
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         return imagepng($this->image, $file, $quality, $filters);
269 269
     }
270 270
 
271
-    protected function output_jpeg(array $options=array()) {
271
+    protected function output_jpeg(array $options = array()){
272 272
         $file = isset($options['file']) ? $options['file'] : null;
273 273
         $quality = isset($options['quality'])
274 274
             ? $options['quality']
@@ -278,14 +278,14 @@  discard block
 block discarded – undo
278 278
         return imagejpeg($this->image, $file, $quality);
279 279
     }
280 280
 
281
-    protected function output_gif(array $options=array()) {
281
+    protected function output_gif(array $options = array()){
282 282
         $file = isset($options['file']) ? $options['file'] : null;
283 283
         if (isset($options['file']) && !headers_sent())
284 284
             header("Content-Type: image/gif");
285 285
         return imagegif($this->image, $file);
286 286
     }
287 287
 
288
-    protected function gdColor() {
288
+    protected function gdColor(){
289 289
         $args = func_get_args();
290 290
 
291 291
         $exprRGB = '/^rgb\(\s*(\d{1,3})\s*\,\s*(\d{1,3})\s*\,\s*(\d{1,3})\s*\)$/i';
@@ -327,15 +327,15 @@  discard block
 block discarded – undo
327 327
         return imagecolorallocate($this->image, $r, $g, $b);
328 328
     }
329 329
 
330
-    protected function imageFilledRectangle($x1, $y1, $x2, $y2, $color) {
330
+    protected function imageFilledRectangle($x1, $y1, $x2, $y2, $color){
331 331
         $color = $this->gdColor($color);
332 332
         if ($color === false) return false;
333 333
         return imageFilledRectangle($this->image, $x1, $y1, $x2, $y2, $color);
334 334
     }
335 335
 
336 336
     protected function imageCopyResampled(
337
-        $src, $dstX=0, $dstY=0, $srcX=0, $srcY=0, $dstW=null, $dstH=null, $srcW=null, $srcH=null
338
-    ) {
337
+        $src, $dstX = 0, $dstY = 0, $srcX = 0, $srcY = 0, $dstW = null, $dstH = null, $srcW = null, $srcH = null
338
+    ){
339 339
         $imageDetails = $this->buildImage($src);
340 340
 
341 341
         if ($imageDetails === false)
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/helper_text.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
   *      @link http://kcfinder.sunhater.com
13 13
   */
14 14
 
15
-class text {
15
+class text{
16 16
 
17 17
   /** Replace repeated white spaces to single space
18 18
     * @param string $string
19 19
     * @return string */
20 20
 
21
-    static function clearWhitespaces($string) {
21
+    static function clearWhitespaces($string){
22 22
         return trim(preg_replace('/\s+/s', " ", $string));
23 23
     }
24 24
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     * @param string $string
27 27
     * @return string */
28 28
 
29
-    static function htmlValue($string) {
29
+    static function htmlValue($string){
30 30
         return
31 31
             str_replace('"', "&quot;",
32 32
             str_replace("'", '&#39;',
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     * @param string $string
40 40
     * @return string */
41 41
 
42
-    static function jsValue($string) {
42
+    static function jsValue($string){
43 43
         return
44 44
             preg_replace('/\r?\n/', "\\n",
45 45
             str_replace('"', "\\\"",
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     * @param string $string
53 53
     * @param bool $cdata */
54 54
 
55
-    static function xmlData($string, $cdata=false) {
55
+    static function xmlData($string, $cdata = false){
56 56
         $string = str_replace("]]>", "]]]]><![CDATA[>", $string);
57 57
         if (!$cdata)
58 58
             $string = "<![CDATA[$string]]>";
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     * @param string $code
64 64
     * @return string */
65 65
 
66
-    static function compressCSS($code) {
66
+    static function compressCSS($code){
67 67
         $code = self::clearWhitespaces($code);
68 68
         $code = preg_replace('/ ?\{ ?/', "{", $code);
69 69
         $code = preg_replace('/ ?\} ?/', "}", $code);
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/class_image_gmagick.php 1 patch
Spacing   +15 added lines, -15 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 image_gmagick extends image {
15
+class image_gmagick extends image{
16 16
 
17 17
     static $MIMES = array(
18 18
         //'tif' => "image/tiff"
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     // ABSTRACT PUBLIC METHODS
23 23
 
24
-    public function resize($width, $height) {//
24
+    public function resize($width, $height){//
25 25
         if (!$width) $width = 1;
26 26
         if (!$height) $height = 1;
27 27
         try {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         return true;
35 35
     }
36 36
 
37
-    public function resizeFit($width, $height, $background=false) {//
37
+    public function resizeFit($width, $height, $background = false){//
38 38
         if (!$width) $width = 1;
39 39
         if (!$height) $height = 1;
40 40
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         }
70 70
     }
71 71
 
72
-    public function resizeCrop($width, $height, $offset=false) {
72
+    public function resizeCrop($width, $height, $offset = false){
73 73
         if (!$width) $width = 1;
74 74
         if (!$height) $height = 1;
75 75
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         return true;
120 120
     }
121 121
 
122
-    public function rotate($angle, $background="#000000") {
122
+    public function rotate($angle, $background = "#000000"){
123 123
         try {
124 124
             $this->image->rotateImage($background, $angle);
125 125
             $w = $this->image->getImageWidth();
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         return true;
133 133
     }
134 134
 
135
-    public function flipHorizontal() {
135
+    public function flipHorizontal(){
136 136
         try {
137 137
             $this->image->flopImage();
138 138
         } catch (Exception $e) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         return true;
142 142
     }
143 143
 
144
-    public function flipVertical() {
144
+    public function flipVertical(){
145 145
         try {
146 146
             $this->image->flipImage();
147 147
         } catch (Exception $e) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         return true;
151 151
     }
152 152
 
153
-    public function watermark($file, $left=false, $top=false) {
153
+    public function watermark($file, $left = false, $top = false){
154 154
         try {
155 155
             $wm = new Gmagick($file);
156 156
             $w = $wm->getImageWidth();
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
     // ABSTRACT PROTECTED METHODS
187 187
 
188
-    protected function getBlankImage($width, $height) {
188
+    protected function getBlankImage($width, $height){
189 189
         try {
190 190
             $img = new Gmagick();
191 191
             $img->newImage($width, $height, "none");
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         return $img;
196 196
     }
197 197
 
198
-    protected function getImage($image, &$width, &$height) {
198
+    protected function getImage($image, &$width, &$height){
199 199
 
200 200
         if (is_object($image) && ($image instanceof image_gmagick)) {
201 201
             $width = $image->width;
@@ -232,11 +232,11 @@  discard block
 block discarded – undo
232 232
 
233 233
     // PSEUDO-ABSTRACT STATIC METHODS
234 234
 
235
-    static function available() {
235
+    static function available(){
236 236
         return class_exists("Gmagick");
237 237
     }
238 238
 
239
-    static function checkImage($file) {
239
+    static function checkImage($file){
240 240
         try {
241 241
             $img = new Gmagic($file);
242 242
         } catch (Exception $e) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
     // INHERIT METHODS
250 250
 
251
-    public function output($type="jpeg", array $options=array()) {
251
+    public function output($type = "jpeg", array $options = array()){
252 252
         $type = strtolower($type);
253 253
         try {
254 254
             $this->image->setImageFormat($type);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             echo $this->image;
268 268
 
269 269
         } else {
270
-            $file = $options['file'] . ".$type";
270
+            $file = $options['file'].".$type";
271 271
             try {
272 272
                 $this->image->writeImage($file);
273 273
             } catch (Exception $e) {
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
     // OWN METHODS
289 289
 
290
-    protected function optimize_jpeg(array $options=array()) {
290
+    protected function optimize_jpeg(array $options = array()){
291 291
         $quality = isset($options['quality']) ? $options['quality'] : self::DEFAULT_JPEG_QUALITY;
292 292
         try {
293 293
             $this->image->setCompressionQuality($quality);
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/class_zipFolder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
   *      @link http://kcfinder.sunhater.com
14 14
   */
15 15
 
16
-class zipFolder {
16
+class zipFolder{
17 17
     protected $zip;
18 18
     protected $root;
19 19
     protected $ignored;
20 20
 
21
-    function __construct($file, $folder, $ignored=null) {
21
+    function __construct($file, $folder, $ignored = null){
22 22
         $this->zip = new ZipArchive();
23 23
 
24 24
         $this->ignored = is_array($ignored)
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $this->zip->close();
40 40
     }
41 41
 
42
-    function zip($folder, $parent=null) {
42
+    function zip($folder, $parent = null){
43 43
         $full_path = "{$this->root}$parent$folder";
44 44
         $zip_path = "$parent$folder";
45 45
         $this->zip->addEmptyDir($zip_path);
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/config.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 	
27 27
     'theme' => "evo",
28 28
 
29
-    'uploadURL' => rtrim($modx->config['rb_base_url'],'/'),
30
-    'uploadDir' => rtrim($modx->config['rb_base_dir'],'/'),
29
+    'uploadURL' => rtrim($modx->config['rb_base_url'], '/'),
30
+    'uploadDir' => rtrim($modx->config['rb_base_dir'], '/'),
31 31
     'siteURL' => $modx->config['site_url'],
32
-    'assetsURL' => rtrim($modx->config['rb_base_url'],'/'),
33
-    'dirPerms' => intval($modx->config['new_folder_permissions'],8),
34
-    'filePerms' => intval($modx->config['new_file_permissions'],8),
32
+    'assetsURL' => rtrim($modx->config['rb_base_url'], '/'),
33
+    'dirPerms' => intval($modx->config['new_folder_permissions'], 8),
34
+    'filePerms' => intval($modx->config['new_file_permissions'], 8),
35 35
     'maxfilesize' => $settings['upload_maxsize'],
36 36
     'denyUpdateCheck' => true,
37 37
 
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
     'types' => array(
59 59
 
60 60
         // CKEditor & FCKEditor types
61
-        'files'   =>  str_replace(',',' ',$modx->config['upload_files']),
62
-        'flash'   =>  str_replace(',',' ',$modx->config['upload_flash']),
63
-        'images'  =>  str_replace(',',' ',$modx->config['upload_images']),
61
+        'files'   =>  str_replace(',', ' ', $modx->config['upload_files']),
62
+        'flash'   =>  str_replace(',', ' ', $modx->config['upload_flash']),
63
+        'images'  =>  str_replace(',', ' ', $modx->config['upload_images']),
64 64
 
65 65
         // TinyMCE types
66
-        'file'    =>  str_replace(',',' ',$modx->config['upload_files']),
67
-        'media'   =>  str_replace(',',' ',$modx->config['upload_media']),
68
-        'image'   =>  str_replace(',',' ',$modx->config['upload_images']),
66
+        'file'    =>  str_replace(',', ' ', $modx->config['upload_files']),
67
+        'media'   =>  str_replace(',', ' ', $modx->config['upload_media']),
68
+        'image'   =>  str_replace(',', ' ', $modx->config['upload_images']),
69 69
     ),
70 70
     'dirnameChangeChars' => array(
71 71
         ' ' => "_",
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     // THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION CONFIGURATION
91 91
     '_check4htaccess' => false,
92
-    '_tinyMCEPath' => MODX_BASE_URL . "assets/plugins/tinymce/tiny_mce",
92
+    '_tinyMCEPath' => MODX_BASE_URL."assets/plugins/tinymce/tiny_mce",
93 93
 
94 94
     '_sessionVar' => &$_SESSION['KCFINDER'],
95 95
     //'_sessionLifetime' => 30,
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/browse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 
15 15
 require "core/autoload.php"; // Init MODX
16 16
 
17
-function returnNoPermissionsMessage($role) {
17
+function returnNoPermissionsMessage($role){
18 18
 	global $_lang;
19 19
 	echo sprintf($_lang['files_management_no_permission'], $role);
20 20
 	exit;
21 21
 }
22 22
 
23
-if( $_GET['type'] == 'images' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_images')) returnNoPermissionsMessage('assets_images');
24
-if( $_GET['type'] == 'files'  && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_files'))  returnNoPermissionsMessage('assets_files');
23
+if ($_GET['type'] == 'images' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_images')) returnNoPermissionsMessage('assets_images');
24
+if ($_GET['type'] == 'files' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_files'))  returnNoPermissionsMessage('assets_files');
25 25
 
26 26
 $browser = new browser($modx);
27 27
 $browser->action();
Please login to merge, or discard this patch.
manager/media/script/air-datepicker/datepicker.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
3
-    function __construct() {
2
+class DATEPICKER{
3
+    function __construct(){
4 4
     }
5
-    function getDP() {
5
+    function getDP(){
6 6
         global $modx;
7 7
         
8 8
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
9
-        if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
9
+        if (!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
10 10
 		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
11 11
         return $modx->mergeSettingsContent($load_script);
12 12
     }
13
-    function getLangCode() {
13
+    function getLangCode(){
14 14
         global $modx, $modx_lang_attribute;
15 15
         
16
-        if(!$modx_lang_attribute) return 'en';
16
+        if (!$modx_lang_attribute) return 'en';
17 17
         
18 18
         $lc = $modx_lang_attribute;
19
-        if($lc=='uk') return 'ru';
20
-        $dp_path = str_replace('\\','/',dirname(__FILE__));
21
-        if(is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) return $modx_lang_attribute;
19
+        if ($lc == 'uk') return 'ru';
20
+        $dp_path = str_replace('\\', '/', dirname(__FILE__));
21
+        if (is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) return $modx_lang_attribute;
22 22
         else                                               return 'en';
23 23
     }
24 24
 }
Please login to merge, or discard this patch.