diff --git a/install-dev/upgrade/php/fix_download_product_feature_active.php b/install-dev/upgrade/php/fix_download_product_feature_active.php new file mode 100644 index 000000000..354b3e5f5 --- /dev/null +++ b/install-dev/upgrade/php/fix_download_product_feature_active.php @@ -0,0 +1,31 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function fix_download_product_feature_active() +{ + if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `'._DB_PREFIX_.'product_download` WHERE `active` = 1 ;') > 0) + Configuration::updateGlobaleValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE'); +} \ No newline at end of file