Completed
Pull Request — develop (#518)
by Agel_Nash
05:24
created
manager/media/browser/mcpuk/lib/helper_httpCache.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc HTTP cache helper class
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
-  */
4
+ *
5
+ *      @desc HTTP cache helper class
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 14
 
15 15
 class httpCache {
16 16
     const DEFAULT_TYPE = "text/html";
17 17
     const DEFAULT_EXPIRE = 604800; // in seconds
18 18
 
19
-  /** Cache a file. The $type parameter might define the MIME type of the file
20
-    * or path to magic file to autodetect the MIME type. If you skip $type
21
-    * parameter the method will try with the default magic file. Autodetection
22
-    * of MIME type requires Fileinfo PHP extension used in file::getMimeType()
23
-    * @param string $file
24
-    * @param string $type
25
-    * @param integer $expire
26
-    * @param array $headers */
19
+    /** Cache a file. The $type parameter might define the MIME type of the file
20
+     * or path to magic file to autodetect the MIME type. If you skip $type
21
+     * parameter the method will try with the default magic file. Autodetection
22
+     * of MIME type requires Fileinfo PHP extension used in file::getMimeType()
23
+     * @param string $file
24
+     * @param string $type
25
+     * @param integer $expire
26
+     * @param array $headers */
27 27
 
28 28
     static function file($file, $type=null, $expire=null, array $headers=null) {
29 29
         $mtime = @filemtime($file);
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
         self::content(@file_get_contents($file), $mtime, $type, $expire, $headers, false);
40 40
     }
41 41
 
42
-  /** Cache the given $content with $mtime modification time.
43
-    * @param binary $content
44
-    * @param integer $mtime
45
-    * @param string $type
46
-    * @param integer $expire
47
-    * @param array $headers
48
-    * @param bool $checkMTime */
42
+    /** Cache the given $content with $mtime modification time.
43
+     * @param binary $content
44
+     * @param integer $mtime
45
+     * @param string $type
46
+     * @param integer $expire
47
+     * @param array $headers
48
+     * @param bool $checkMTime */
49 49
 
50 50
     static function content($content, $mtime, $type=null, $expire=null, array $headers=null, $checkMTime=true) {
51 51
         if ($checkMTime) self::checkMTime($mtime);
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
         echo $content;
63 63
     }
64 64
 
65
-  /** Check if given modification time is newer than client-side one. If not,
66
-    * the method will tell the client to get the content from its own cache.
67
-    * Afterwards the script process will be terminated. This feature requires
68
-    * the PHP to be configured as Apache module.
69
-    * @param integer $mtime */
65
+    /** Check if given modification time is newer than client-side one. If not,
66
+     * the method will tell the client to get the content from its own cache.
67
+     * Afterwards the script process will be terminated. This feature requires
68
+     * the PHP to be configured as Apache module.
69
+     * @param integer $mtime */
70 70
 
71 71
     static function checkMTime($mtime, $sendHeaders=null) {
72 72
         header("Last-Modified: " . gmdate("D, d M Y H:i:s", $mtime) . " GMT");
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/class_image_gd.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc GD image driver class
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
-  */
4
+ *
5
+ *      @desc GD image driver class
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 14
 
15 15
 class image_gd extends image {
16 16
 
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/helper_text.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc Text processing helper class
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
-  */
4
+ *
5
+ *      @desc Text processing helper class
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 14
 
15 15
 class text {
16 16
 
17
-  /** Replace repeated white spaces to single space
18
-    * @param string $string
19
-    * @return string */
17
+    /** Replace repeated white spaces to single space
18
+     * @param string $string
19
+     * @return string */
20 20
 
21 21
     static function clearWhitespaces($string) {
22 22
         return trim(preg_replace('/\s+/s', " ", $string));
23 23
     }
24 24
 
25
-  /** Normalize the string for HTML attribute value
26
-    * @param string $string
27
-    * @return string */
25
+    /** Normalize the string for HTML attribute value
26
+     * @param string $string
27
+     * @return string */
28 28
 
29 29
     static function htmlValue($string) {
30 30
         return
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
         $string))));
36 36
     }
37 37
 
38
-  /** Normalize the string for JavaScript string value
39
-    * @param string $string
40
-    * @return string */
38
+    /** Normalize the string for JavaScript string value
39
+     * @param string $string
40
+     * @return string */
41 41
 
42 42
     static function jsValue($string) {
43 43
         return
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
         $string))));
49 49
     }
50 50
 
51
-  /** Normalize the string for XML tag content data
52
-    * @param string $string
53
-    * @param bool $cdata */
51
+    /** Normalize the string for XML tag content data
52
+     * @param string $string
53
+     * @param bool $cdata */
54 54
 
55 55
     static function xmlData($string, $cdata=false) {
56 56
         $string = str_replace("]]>", "]]]]><![CDATA[>", $string);
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
         return $string;
60 60
     }
61 61
 
62
-  /** Returns compressed content of given CSS code
63
-    * @param string $code
64
-    * @return string */
62
+    /** Returns compressed content of given CSS code
63
+     * @param string $code
64
+     * @return string */
65 65
 
66 66
     static function compressCSS($code) {
67 67
         $code = self::clearWhitespaces($code);
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/class_image_gmagick.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc GraphicsMagick image driver class
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
-  */
4
+ *
5
+ *      @desc GraphicsMagick image driver class
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 14
 
15 15
 class image_gmagick extends image {
16 16
 
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/class_zipFolder.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project. The class are taken from
4
-  * http://www.php.net/manual/en/function.ziparchive-addemptydir.php
5
-  *
6
-  *      @desc Directory to ZIP file archivator
7
-  *   @package KCFinder
8
-  *   @version 2.54
9
-  *    @author Pavel Tzonkov <[email protected]>
10
-  * @copyright 2010-2014 KCFinder Project
11
-  *   @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
12
-  *   @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
13
-  *      @link http://kcfinder.sunhater.com
14
-  */
4
+ * http://www.php.net/manual/en/function.ziparchive-addemptydir.php
5
+ *
6
+ *      @desc Directory to ZIP file archivator
7
+ *   @package KCFinder
8
+ *   @version 2.54
9
+ *    @author Pavel Tzonkov <[email protected]>
10
+ * @copyright 2010-2014 KCFinder Project
11
+ *   @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
12
+ *   @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
13
+ *      @link http://kcfinder.sunhater.com
14
+ */
15 15
 
16 16
 class zipFolder {
17 17
     protected $zip;
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/config.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc Base configuration file
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
-  */
4
+ *
5
+ *      @desc Base configuration file
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 14
 
15 15
 // IMPORTANT!!! Do not remove uncommented settings in this file even if
16 16
 // you are using session configuration.
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     'dirnameChangeChars' => array(
71 71
         ' ' => "_",
72 72
         ':' => "."
73
-     ), 
73
+        ), 
74 74
     'mime_magic' => "",
75 75
 
76 76
     'maxImageWidth' => $modx->config['maxImageWidth'],
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/browse.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc Browser calling script
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
-  */
4
+ *
5
+ *      @desc Browser calling script
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 14
 
15 15
 require "core/autoload.php"; // Init MODX
16 16
 
17 17
 function returnNoPermissionsMessage($role) {
18
-	global $_lang;
19
-	echo sprintf($_lang['files_management_no_permission'], $role);
20
-	exit;
18
+    global $_lang;
19
+    echo sprintf($_lang['files_management_no_permission'], $role);
20
+    exit;
21 21
 }
22 22
 
23 23
 if( $_GET['type'] == 'images' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_images')) returnNoPermissionsMessage('assets_images');
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/upload.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** This file is part of KCFinder project
4
-  *
5
-  *      @desc Upload calling script
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
-  */
4
+ *
5
+ *      @desc Upload calling script
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 14
 
15 15
 require "core/autoload.php";
16 16
 $uploader = new uploader($modx);
Please login to merge, or discard this patch.
manager/media/script/air-datepicker/datepicker.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
         
8 8
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
9 9
         if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
10
-		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
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 13
     function getLangCode() {
Please login to merge, or discard this patch.