[*] Classes : images.inc.php functions are now all deprecated, use the new class ImageManager instead

This commit is contained in:
rMalie
2012-01-23 10:21:51 +00:00
parent 6f98c3b8f5
commit 84f4d0838c
32 changed files with 569 additions and 427 deletions
+2 -2
View File
@@ -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);