Fix the check of template dir

This commit is contained in:
Damien Finck 2016-12-27 15:15:26 +01:00
parent 14451ade7a
commit 545f167a7b
3 changed files with 6 additions and 2 deletions

View File

@ -101,8 +101,10 @@ if (extension_loaded('intl')) {
$messages[] = new Message('danger', __('Check','You need to enable the PHP Intl extension.'));
}
// Is template compile dir writable ?
if (is_writable(ROOT_DIR . COMPILE_DIR)) {
// Is template compile dir exists and writable ?
if (!file_exists(ROOT_DIR . COMPILE_DIR)) {
$messages[] = new Message('danger', __f('Check','The template compile directory (%s) don\'t exist in "%s". Run composer.', COMPILE_DIR, realpath(ROOT_DIR)));
} elseif (is_writable(ROOT_DIR . COMPILE_DIR)) {
$messages[] = new Message('info', __f('Check','The template compile directory (%s) is writable.', realpath(ROOT_DIR . COMPILE_DIR)));
} else {
$messages[] = new Message('danger', __f('Check','The template compile directory (%s) is not writable.', realpath(ROOT_DIR . COMPILE_DIR)));

View File

@ -414,6 +414,7 @@
"PHP version %s is enough (needed at least PHP %s).": "PHP version %s is enough (needed at least PHP %s).",
"You need to enable the PHP Intl extension.": "You need to enable the PHP Intl extension.",
"PHP Intl extension is enabled.": "PHP Intl extension is enabled.",
"The template compile directory (%s) don't exist in \"%s\". Run composer.": "The template compile directory (%s) don't exist in \"%s\". Run composer.",
"The template compile directory (%s) is not writable.": "The template compile directory (%s) is not writable.",
"The template compile directory (%s) is writable.": "The template compile directory (%s) is writable.",
"The config file directory (%s) is not writable and the config file (%s) dos not exists.": "The config file directory (%s) is not writable and the config file (%s) dos not exists.",

View File

@ -417,6 +417,7 @@
"PHP version %s is enough (needed at least PHP %s).": "Version de PHP %s suffisante (nécessite au moins PHP %s).",
"You need to enable the PHP Intl extension.": "Vous devez activer l'extension PHP Intl.",
"PHP Intl extension is enabled.": "L'extension PHP Intl est activée.",
"The template compile directory (%s) don't exist in \"%s\". Run composer.": "Le dossier de compilation des templates (%s) n'existe pas dans \"%s\". Exécuter composer.",
"The template compile directory (%s) is not writable.": "Le dossier de compilation des templates (%s) n'est pas accessible en écriture.",
"The template compile directory (%s) is writable.": "Le dossier de compilation des templates (%s) est accessible en écriture.",
"The config file directory (%s) is not writable and the config file (%s) dos not exists.": "Le dossier du fichier de configuration (%s) n'est pas accessible en écriture et le fichier de configuration (%s) n'existe pas.",