X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FApplicationUtils.php;h=7fe3cb3245a9791f2a0324a3f6fd3ec377421cfc;hb=7be2a2d5f4078ba97b3281f2b5c33ae9bd337be5;hp=5643f4a09706f2bb5b867153ee09c3c4974d77c3;hpb=c8d96b4729a96ff2321862ca13a727658860e7a5;p=github%2Fshaarli%2FShaarli.git diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php index 5643f4a0..7fe3cb32 100644 --- a/application/ApplicationUtils.php +++ b/application/ApplicationUtils.php @@ -1,4 +1,9 @@ get('resource.theme'), - ) as $path) { - if (! is_readable(realpath($path))) { - $errors[] = '"'.$path.'" directory is not readable'; + 'application', + 'inc', + 'plugins', + $rainTplDir, + $rainTplDir . '/' . $conf->get('resource.theme'), + ) as $path) { + if (!is_readable(realpath($path))) { + $errors[] = '"' . $path . '" ' . t('directory is not readable'); } } // Check cache and data directories are readable and writable foreach (array( - $conf->get('resource.thumbnails_cache'), - $conf->get('resource.data_dir'), - $conf->get('resource.page_cache'), - $conf->get('resource.raintpl_tmp'), - ) as $path) { - if (! is_readable(realpath($path))) { - $errors[] = '"'.$path.'" directory is not readable'; + $conf->get('resource.thumbnails_cache'), + $conf->get('resource.data_dir'), + $conf->get('resource.page_cache'), + $conf->get('resource.raintpl_tmp'), + ) as $path) { + if (!is_readable(realpath($path))) { + $errors[] = '"' . $path . '" ' . t('directory is not readable'); } - if (! is_writable(realpath($path))) { - $errors[] = '"'.$path.'" directory is not writable'; + if (!is_writable(realpath($path))) { + $errors[] = '"' . $path . '" ' . t('directory is not writable'); } } // Check configuration files are readable and writable foreach (array( - $conf->getConfigFileExt(), - $conf->get('resource.datastore'), - $conf->get('resource.ban_file'), - $conf->get('resource.log'), - $conf->get('resource.update_check'), - ) as $path) { - if (! is_file(realpath($path))) { + $conf->getConfigFileExt(), + $conf->get('resource.datastore'), + $conf->get('resource.ban_file'), + $conf->get('resource.log'), + $conf->get('resource.update_check'), + ) as $path) { + if (!is_file(realpath($path))) { # the file may not exist yet continue; } - if (! is_readable(realpath($path))) { - $errors[] = '"'.$path.'" file is not readable'; + if (!is_readable(realpath($path))) { + $errors[] = '"' . $path . '" ' . t('file is not readable'); } - if (! is_writable(realpath($path))) { - $errors[] = '"'.$path.'" file is not writable'; + if (!is_writable(realpath($path))) { + $errors[] = '"' . $path . '" ' . t('file is not writable'); } }