Index: branches/5.2.x/core/ckeditor/ckfinder/core/connector/php/php5/Utils/Misc.php =================================================================== diff -u -N -r15042 -r15316 --- branches/5.2.x/core/ckeditor/ckfinder/core/connector/php/php5/Utils/Misc.php (.../Misc.php) (revision 15042) +++ branches/5.2.x/core/ckeditor/ckfinder/core/connector/php/php5/Utils/Misc.php (.../Misc.php) (revision 15316) @@ -3,7 +3,7 @@ * CKFinder * ======== * http://ckfinder.com -* Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved. +* Copyright (C) 2007-2012, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, @@ -45,6 +45,17 @@ } /** + * Simulate the encodeURIComponent() function available in JavaScript + * @param string $str + * @return string + */ + public static function encodeURIComponent($str) + { + $revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')'); + return strtr(rawurlencode($str), $revert); + } + + /** * Convert any value to boolean, strings like "false", "FalSE" and "off" are also considered as false * * @static @@ -132,6 +143,10 @@ //Default memory limit is 8MB so well stick with that. //To find out what yours is, view your php.ini file. $memoryLimit = CKFinder_Connector_Utils_Misc::returnBytes(@ini_get('memory_limit'))/$MB; + // There are no memory limits, nothing to do + if ($memoryLimit == -1) { + return true; + } if (!$memoryLimit) { $memoryLimit = 8; }