From 0c49b5b4169784f54994c6c9eed9e9d34bcc89cd Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Tue, 13 Sep 2011 15:34:41 +0000 Subject: [PATCH] // fix image drag&drop git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8543 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/ajax.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin-dev/ajax.php b/admin-dev/ajax.php index 3d0b4175f..a51f4a3b6 100644 --- a/admin-dev/ajax.php +++ b/admin-dev/ajax.php @@ -347,7 +347,8 @@ if (array_key_exists('ajaxProductImagesPositions', $_POST)) $pos = explode('_', $value); if ((isset($pos[1])) AND ($pos[1] == $id_image)) { - $position = $key; + // +1 is added because images position range starts from 1 instead of 0 for other objects (products, categories...) + $position = ($key + 1); break; } }