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

This commit is contained in:
tDidierjean
2012-02-13 17:36:34 +00:00
parent 18d872b670
commit 0f40efc18b
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)