Commit 545f167a authored by Damien Finck's avatar Damien Finck
Browse files

Fix the check of template dir

parent 14451ade
......@@ -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)));
......
......@@ -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.",
......
......@@ -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.",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment