[*] Classes : images.inc.php functions are now all deprecated, use the new class ImageManager instead
This commit is contained in:
@@ -158,11 +158,11 @@ class Editorial extends Module
|
||||
Configuration::set('PS_IMAGE_GENERATION_METHOD', 1);
|
||||
if(file_exists(dirname(__FILE__).'/homepage_logo.jpg'))
|
||||
unlink(dirname(__FILE__).'/homepage_logo.jpg');
|
||||
if ($error = checkImage($_FILES['body_homepage_logo']))
|
||||
if ($error = ImageManager::validateUpload($_FILES['body_homepage_logo']))
|
||||
$errors .= $error;
|
||||
elseif (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['body_homepage_logo']['tmp_name'], $tmpName))
|
||||
return false;
|
||||
elseif (!imageResize($tmpName, dirname(__FILE__).'/homepage_logo.jpg'))
|
||||
elseif (!ImageManager::resize($tmpName, dirname(__FILE__).'/homepage_logo.jpg'))
|
||||
$errors .= $this->displayError($this->l('An error occurred during the image upload.'));
|
||||
if (isset($tmpName))
|
||||
unlink($tmpName);
|
||||
|
||||
Reference in New Issue
Block a user