From 9b66df95e2474b0af7cd8a8b962975e398f4ae95 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Thu, 13 Sep 2012 15:20:47 +0000 Subject: [PATCH] // Fixed wrong path (I guess) git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17348 b9a71923-0436-4b27-9f14-aed3839534dd --- .../upgrade/php/p15015_blockadvertising_extension.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install-dev/upgrade/php/p15015_blockadvertising_extension.php b/install-dev/upgrade/php/p15015_blockadvertising_extension.php index af1d5eddb..e2e59589d 100644 --- a/install-dev/upgrade/php/p15015_blockadvertising_extension.php +++ b/install-dev/upgrade/php/p15015_blockadvertising_extension.php @@ -27,9 +27,12 @@ function p15015_blockadvertising_extension() { + if (!defined('_PS_ROOT_DIR_')) + define('_PS_ROOT_DIR_', realpath(INSTALL_PATH.'/../')); + // Try to update with the extension of the image that exists in the module directory - if (file_exists(_PS_MODULE_DIR_.'blockadvertising')) - foreach (scandir(_PS_MODULE_DIR_.'blockadvertising') as $file) + if (file_exists(_PS_ROOT_DIR_.'modules/blockadvertising')) + foreach (scandir(_PS_ROOT_DIR_.'modules/blockadvertising') as $file) if (in_array($file, array('advertising.jpg', 'advertising.gif', 'advertising.png'))) Db::getInstance()->execute(' REPLACE INTO `'._DB_PREFIX_.'configuration` (name, value)