// Fix duplication of images

This commit is contained in:
rMalie
2011-12-20 09:40:59 +00:00
parent 2f92d7d271
commit 2947749755
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -236,6 +236,7 @@ class ImageCore extends ObjectModel
{
$image_old = new Image($row['id_image']);
$image_new = clone $image_old;
unset($image_new->id);
$image_new->id_product = (int)$id_product_new;
// A new id is generated for the cloned image when calling add()
if ($image_new->add())