// Fix bug translations

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15019 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-05-03 07:49:13 +00:00
parent 9e9154a843
commit 455167a9d4
2 changed files with 22 additions and 51 deletions
@@ -1568,9 +1568,9 @@ class AdminTranslationsControllerCore extends AdminController
*/
public function getListModules()
{
if (!Tools::file_exists_cache($this->translations_informations[$this->type_selected]['dir']))
throw new PrestaShopException(Tools::displayError('Fatal error: Module directory does not exist').'('.$this->translations_informations[$this->type_selected]['dir'].')');
if (!is_writable($this->translations_informations[$this->type_selected]['dir']))
if (!Tools::file_exists_cache($this->translations_informations['modules']['dir']))
throw new PrestaShopException(Tools::displayError('Fatal error: Module directory does not exist').'('.$this->translations_informations['modules']['dir'].')');
if (!is_writable($this->translations_informations['modules']['dir']))
throw new PrestaShopException(Tools::displayError('The module directory must be writable'));
$modules = array();
@@ -1583,13 +1583,13 @@ class AdminTranslationsControllerCore extends AdminController
$module = $module['name'];
}
else if ($this->theme_selected == self::DEFAULT_THEME_NAME)
if (Tools::file_exists_cache($this->translations_informations[$this->type_selected]['dir']))
$modules = scandir($this->translations_informations[$this->type_selected]['dir']);
if (Tools::file_exists_cache($this->translations_informations['modules']['dir']))
$modules = scandir($this->translations_informations['modules']['dir']);
else
$this->displayWarning(Tools::displayError('There are no modules in your copy of PrestaShop. Use the Modules tab to activate them or go to our Website to download additional Modules.'));
else
if (Tools::file_exists_cache($this->translations_informations[$this->type_selected]['override']['dir']))
$modules = scandir($this->translations_informations[$this->type_selected]['override']['dir']);
if (Tools::file_exists_cache($this->translations_informations['modules']['override']['dir']))
$modules = scandir($this->translations_informations['modules']['override']['dir']);
else
$this->displayWarning(Tools::displayError('There are no modules in your copy of PrestaShop. Use the Modules tab to activate them or go to our Website to download additional Modules.'));