change instructions messages

This commit is contained in:
Nicolas Lœuillet 2013-10-03 14:23:03 +02:00
parent 07ae20eeed
commit 7f17a38d35
1 changed files with 9 additions and 6 deletions

View File

@ -109,6 +109,14 @@ class Poche
return false;
}
if (! is_writable(CACHE)) {
$this->notInstalledMessage = '<h1>error</h1><p>You don\'t have write access on cache directory.</p>';
self::$canRenderTemplates = false;
return false;
}
# Check if the selected theme and its requirements are present
if (! is_dir(THEME . '/' . $this->getTheme())) {
@ -145,16 +153,11 @@ class Poche
if (empty($configSalt)) {
$msg = '<h1>error</h1><p>You have not yet filled in the SALT value in the config.inc.php file.</p>';
} else if (! is_writable(CACHE)) {
Tools::logm('you don\'t have write access on cache directory');
$msg = '<h1>error</h1><p>You don\'t have write access on cache directory.</p>';
} else if (STORAGE == 'sqlite' && ! file_exists(STORAGE_SQLITE)) {
Tools::logm('sqlite file doesn\'t exist');
$msg = '<h1>error</h1><p>sqlite file doesn\'t exist, you can find it in install folder. Copy it in /db folder.</p>';
} else if (file_exists(ROOT . '/install/update.php') && ! DEBUG_POCHE) {
$msg = '<h1>setup</h1><p><strong>It\'s your first time here?</strong> Please copy /install/poche.sqlite in db folder. Then, delete install folder.<br /><strong>If you have already installed poche</strong>, an update is needed <a href="install/update.php">by clicking here</a>.</p>';
} else if (is_dir(ROOT . '/install') && ! DEBUG_POCHE) {
$msg = '<h1>setup</h1><p><strong>If you want to update your poche</strong>, you just have to delete /install folder. <br /><strong>To install your poche with sqlite</strong>, copy /install/poche.sqlite in /db and delete the folder /install. you have to delete the /install folder before using poche.</p>';
$msg = '<h1>install folder</h1><p>you have to delete the /install folder before using poche.</p>';
} else if (STORAGE == 'sqlite' && ! is_writable(STORAGE_SQLITE)) {
Tools::logm('you don\'t have write access on sqlite file');
$msg = '<h1>error</h1><p>You don\'t have write access on sqlite file.</p>';