@@ -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,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); |
@@ -166,7 +166,7 @@ |
||
166 | 166 | $resp = _fetch_remote_file( $url, $request_headers ); |
167 | 167 | |
168 | 168 | if (isset($resp) and $resp) { |
169 | - if ($resp->status == '304' ) { |
|
169 | + if ($resp->status == '304' ) { |
|
170 | 170 | // we have the most current copy |
171 | 171 | if ( MAGPIE_DEBUG > 1) { |
172 | 172 | debug("Got 304 for $url"); |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | // show debug information |
5 | 5 | if(isset($enable_debug) && $enable_debug==true) { |
6 | - ?> |
|
6 | + ?> |
|
7 | 7 | <script language="javascript"> |
8 | 8 | //document.onload = removeDebug(); |
9 | 9 | |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | } |
34 | 34 | </style> |
35 | 35 | <?php |
36 | - $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tend = $mtime; $totaltime = ($tend - $tstart); |
|
37 | - ?> |
|
36 | + $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tend = $mtime; $totaltime = ($tend - $tstart); |
|
37 | + ?> |
|
38 | 38 | <div class='debug' id='debug' name='debug' onClick="removeDebugDiv();"> |
39 | 39 | <table border="0" cellspacing="0" cellpadding="0"> |
40 | 40 | <tr> |
@@ -19,60 +19,60 @@ |
||
19 | 19 | </head><body> |
20 | 20 | "; |
21 | 21 | if($is_error) { |
22 | - $parsedMessageString .= "<h3 style='color:red;background:#e0e0e0;padding:2px;'> MODX Parse Error </h3> |
|
22 | + $parsedMessageString .= "<h3 style='color:red;background:#e0e0e0;padding:2px;'> MODX Parse Error </h3> |
|
23 | 23 | <table border='0' cellpadding='1' cellspacing='0'> |
24 | 24 | <tr><td colspan='3'>MODX encountered the following error while attempting to parse the requested resource:</td></tr> |
25 | 25 | <tr><td colspan='3'><b style='color:red;'>« $msg »</b></td></tr>"; |
26 | 26 | } else { |
27 | - $parsedMessageString .= "<h3 style='color:#003399; background:#eeeeee;padding:2px;'> MODX Debug/ stop message </h3> |
|
27 | + $parsedMessageString .= "<h3 style='color:#003399; background:#eeeeee;padding:2px;'> MODX Debug/ stop message </h3> |
|
28 | 28 | <table border='0' cellpadding='1' cellspacing='0'> |
29 | 29 | <tr><td colspan='3'>The MODX parser recieved the following debug/ stop message:</td></tr> |
30 | 30 | <tr><td colspan='3'><b style='color:#003399;'>« $msg »</b></td></tr>"; |
31 | 31 | } |
32 | 32 | |
33 | 33 | if(!empty($query)) { |
34 | - $parsedMessageString .= "<tr><td colspan='3'><hr size='1' width='98%' style='color:#e0e0e0'/><b style='color:#999;font-size: 9px;border-left:1px solid #c0c0c0; margin-left:10px;'> SQL: <span id='sqlHolder'>$query</span></b><hr size='1' width='98%' style='color:#e0e0e0'/> |
|
34 | + $parsedMessageString .= "<tr><td colspan='3'><hr size='1' width='98%' style='color:#e0e0e0'/><b style='color:#999;font-size: 9px;border-left:1px solid #c0c0c0; margin-left:10px;'> SQL: <span id='sqlHolder'>$query</span></b><hr size='1' width='98%' style='color:#e0e0e0'/> |
|
35 | 35 | <a href='javascript:copyToClip();' style='color:#821517;font-size: 9px; text-decoration: none'>[Copy SQL to ClipBoard]</a><textarea id='holdtext' style='display:none;'></textarea></td></tr>"; |
36 | 36 | } |
37 | 37 | |
38 | 38 | if($text!='') { |
39 | 39 | |
40 | - $errortype = array ( |
|
41 | - E_ERROR => "Error", |
|
42 | - E_WARNING => "Warning", |
|
43 | - E_PARSE => "Parsing Error", |
|
44 | - E_NOTICE => "Notice", |
|
45 | - E_CORE_ERROR => "Core Error", |
|
46 | - E_CORE_WARNING => "Core Warning", |
|
47 | - E_COMPILE_ERROR => "Compile Error", |
|
48 | - E_COMPILE_WARNING => "Compile Warning", |
|
49 | - E_USER_ERROR => "User Error", |
|
50 | - E_USER_WARNING => "User Warning", |
|
51 | - E_USER_NOTICE => "User Notice", |
|
52 | - ); |
|
40 | + $errortype = array ( |
|
41 | + E_ERROR => "Error", |
|
42 | + E_WARNING => "Warning", |
|
43 | + E_PARSE => "Parsing Error", |
|
44 | + E_NOTICE => "Notice", |
|
45 | + E_CORE_ERROR => "Core Error", |
|
46 | + E_CORE_WARNING => "Core Warning", |
|
47 | + E_COMPILE_ERROR => "Compile Error", |
|
48 | + E_COMPILE_WARNING => "Compile Warning", |
|
49 | + E_USER_ERROR => "User Error", |
|
50 | + E_USER_WARNING => "User Warning", |
|
51 | + E_USER_NOTICE => "User Notice", |
|
52 | + ); |
|
53 | 53 | |
54 | - $parsedMessageString .= "<tr><td> </td></tr><tr><td colspan='3'><b>PHP error debug</b></td></tr>"; |
|
54 | + $parsedMessageString .= "<tr><td> </td></tr><tr><td colspan='3'><b>PHP error debug</b></td></tr>"; |
|
55 | 55 | |
56 | - $parsedMessageString .= "<tr><td valign='top'> Error: </td>"; |
|
57 | - $parsedMessageString .= "<td colspan='2'>$text</td><td> </td>"; |
|
58 | - $parsedMessageString .= "</tr>"; |
|
56 | + $parsedMessageString .= "<tr><td valign='top'> Error: </td>"; |
|
57 | + $parsedMessageString .= "<td colspan='2'>$text</td><td> </td>"; |
|
58 | + $parsedMessageString .= "</tr>"; |
|
59 | 59 | |
60 | - $parsedMessageString .= "<tr><td valign='top'> Error type/ Nr.: </td>"; |
|
61 | - $parsedMessageString .= "<td colspan='2'>".$errortype[$nr]." - $nr</b></td><td> </td>"; |
|
62 | - $parsedMessageString .= "</tr>"; |
|
60 | + $parsedMessageString .= "<tr><td valign='top'> Error type/ Nr.: </td>"; |
|
61 | + $parsedMessageString .= "<td colspan='2'>".$errortype[$nr]." - $nr</b></td><td> </td>"; |
|
62 | + $parsedMessageString .= "</tr>"; |
|
63 | 63 | |
64 | - $parsedMessageString .= "<tr><td> File: </td>"; |
|
65 | - $parsedMessageString .= "<td colspan='2'>$file</td><td> </td>"; |
|
66 | - $parsedMessageString .= "</tr>"; |
|
64 | + $parsedMessageString .= "<tr><td> File: </td>"; |
|
65 | + $parsedMessageString .= "<td colspan='2'>$file</td><td> </td>"; |
|
66 | + $parsedMessageString .= "</tr>"; |
|
67 | 67 | |
68 | - $parsedMessageString .= "<tr><td> Line: </td>"; |
|
69 | - $parsedMessageString .= "<td colspan='2'>$line</td><td> </td>"; |
|
70 | - $parsedMessageString .= "</tr>"; |
|
71 | - if($source!='') { |
|
72 | - $parsedMessageString .= "<tr><td valign='top'> Line $line source: </td>"; |
|
73 | - $parsedMessageString .= "<td colspan='2'>$source</td><td> </td>"; |
|
74 | - $parsedMessageString .= "</tr>"; |
|
75 | - } |
|
68 | + $parsedMessageString .= "<tr><td> Line: </td>"; |
|
69 | + $parsedMessageString .= "<td colspan='2'>$line</td><td> </td>"; |
|
70 | + $parsedMessageString .= "</tr>"; |
|
71 | + if($source!='') { |
|
72 | + $parsedMessageString .= "<tr><td valign='top'> Line $line source: </td>"; |
|
73 | + $parsedMessageString .= "<td colspan='2'>$source</td><td> </td>"; |
|
74 | + $parsedMessageString .= "</tr>"; |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | $parsedMessageString .= "<tr><td> </td></tr><tr><td colspan='3'><b>Parser timing</b></td></tr>"; |