[-] BO : #PSTEST-705 fix scene image upload

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13273 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-02-13 17:36:34 +00:00
parent e15452ce61
commit 4b9bcd5932
2 changed files with 10 additions and 4 deletions
+4
View File
@@ -118,6 +118,10 @@ class SceneCore extends ObjectModel
public function deleteImage()
{
// Hack to prevent the main scene image from being deleted in AdminController::uploadImage() when a thumb image is uploaded
if (isset($_FILES['thumb']) && (!isset($_FILES['image']) || empty($_FILES['image']['name'])))
return true;
if (parent::deleteImage())
{
if (file_exists($this->image_dir.'thumbs/'.$this->id.'-thumb_scene.'.$this->image_format)