@@ -1,29 +1,29 @@ discard block |
||
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 |
||
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 |
||
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"); |
@@ -1,16 +1,16 @@ |
||
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 |
@@ -1,30 +1,30 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -1,16 +1,16 @@ |
||
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 |
@@ -1,17 +1,17 @@ |
||
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; |
@@ -1,16 +1,16 @@ discard block |
||
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 |
||
70 | 70 | 'dirnameChangeChars' => array( |
71 | 71 | ' ' => "_", |
72 | 72 | ':' => "." |
73 | - ), |
|
73 | + ), |
|
74 | 74 | 'mime_magic' => "", |
75 | 75 | |
76 | 76 | 'maxImageWidth' => $modx->config['maxImageWidth'], |
@@ -1,23 +1,23 @@ |
||
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'); |
@@ -1,16 +1,16 @@ |
||
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); |
@@ -7,7 +7,7 @@ |
||
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() { |