merge from 1.5.2

git-svn-id: http://xe-core.googlecode.com/svn/trunk@10446 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-03-20 08:03:02 +00:00
parent 6c23751ef8
commit c727926d9e
382 changed files with 6855 additions and 3603 deletions

View file

@ -148,7 +148,12 @@ class FileHandler {
*/
function moveFile($source, $target) {
$source = FileHandler::getRealPath($source);
return (file_exists($source) && FileHandler::removeFile($target) && FileHandler::rename($source, $target));
if(!file_exists($source))
{
return FALSE;
}
FileHandler::removeFile($target);
return FileHandler::rename($source, $target);
}
/**
@ -529,24 +534,24 @@ class FileHandler {
switch($type) {
case 'gif' :
if(!function_exists('imagecreatefromgif')) return false;
$source = imagecreatefromgif($source_file);
$source = @imagecreatefromgif($source_file);
break;
// jpg
case 'jpeg' :
case 'jpg' :
if(!function_exists('imagecreatefromjpeg')) return false;
$source = imagecreatefromjpeg($source_file);
$source = @imagecreatefromjpeg($source_file);
break;
// png
case 'png' :
if(!function_exists('imagecreatefrompng')) return false;
$source = imagecreatefrompng($source_file);
$source = @imagecreatefrompng($source_file);
break;
// bmp
case 'wbmp' :
case 'bmp' :
if(!function_exists('imagecreatefromwbmp')) return false;
$source = imagecreatefromwbmp($source_file);
$source = @imagecreatefromwbmp($source_file);
break;
default :
return;
@ -676,5 +681,5 @@ class FileHandler {
}
}
/* End of file FileObject.class.php */
/* Location: ./classes/file/FileObject.class.php */
/* End of file FileHandler.class.php */
/* Location: ./classes/file/FileHandler.class.php */