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

This commit is contained in:
tDidierjean committed 2012-02-13 17:36:34 +00:00
1 parent 18d872b670
commit 0f40efc18b
2 files changed
+10 -4

No files matched your search

+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)