// Merge -> revision 8984

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8988 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-03 15:48:07 +00:00
parent 79115b2572
commit ae5fc92bf7
60 changed files with 669 additions and 356 deletions
+5 -1
View File
@@ -2656,7 +2656,11 @@ class ProductCore extends ObjectModel
public static function duplicateDownload($id_product_old, $id_product_new)
{
$resource = Db::getInstance()->ExecuteS('SELECT `display_filename`, `filename`, `date_add`, `date_expiration`, `nb_days_accessible`, `nb_downloadable`, `active`, `is_shareable` FROM `'._DB_PREFIX_.'product_download` WHERE `id_product` = '.(int)($id_product_old));
$sql = 'SELECT `display_filename`, `filename`, `date_add`, `date_expiration`, `nb_days_accessible`, `nb_downloadable`, `active`, `is_shareable`
FROM `'._DB_PREFIX_.'product_download`
WHERE `id_product` = '.(int)$id_product_old;
$resource = Db::getInstance()->Execute($sql);
if (!Db::getInstance()->NumRows())
return true;
$query = 'INSERT INTO `'._DB_PREFIX_.'product_download` (`id_product`, `display_filename`, `filename`, `date_add`, `date_expiration`, `nb_days_accessible`, `nb_downloadable`, `active`, `is_shareable`) VALUES';