From 25ba388d698da93ca97663c55044d245cda85149 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Sun, 8 Sep 2013 18:29:06 +0200 Subject: [PATCH] [-] IN : fix bad pathes --- install-dev/upgrade/php/p15015_blockadvertising_extension.php | 4 ++-- install-dev/upgrade/php/update_genders_images.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install-dev/upgrade/php/p15015_blockadvertising_extension.php b/install-dev/upgrade/php/p15015_blockadvertising_extension.php index aa23cd093..2847cb6ef 100644 --- a/install-dev/upgrade/php/p15015_blockadvertising_extension.php +++ b/install-dev/upgrade/php/p15015_blockadvertising_extension.php @@ -30,8 +30,8 @@ function p15015_blockadvertising_extension() 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_ROOT_DIR_.'modules/blockadvertising')) - foreach (@scandir(_PS_ROOT_DIR_.'modules/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) diff --git a/install-dev/upgrade/php/update_genders_images.php b/install-dev/upgrade/php/update_genders_images.php index 4d21e9542..cee0ae6cd 100644 --- a/install-dev/upgrade/php/update_genders_images.php +++ b/install-dev/upgrade/php/update_genders_images.php @@ -32,6 +32,6 @@ function update_genders_images() @rename(_PS_ROOT_DIR_.'/img/genders/Ms.jpg', _PS_ROOT_DIR_.'/img/genders/2.jpg'); if (@file_exists(_PS_ROOT_DIR_.'/img/genders/Miss.jpg')) @rename(_PS_ROOT_DIR_.'/img/genders/Miss.jpg', _PS_ROOT_DIR_.'/img/genders/3.jpg'); - if (@file_exists(_PS_ROOT_DIR_.'genders/unknown.jpg')) + if (@file_exists(_PS_ROOT_DIR_.'/img/genders/unknown.jpg')) @rename(_PS_ROOT_DIR_.'/img/genders/unknown.jpg', _PS_ROOT_DIR_.'/img/genders/Unknown.jpg'); } \ No newline at end of file