diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 1bae275..d6dbd19 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -109,6 +109,14 @@ class Poche return false; } + + if (! is_writable(CACHE)) { + $this->notInstalledMessage = '

error

You don\'t have write access on cache directory.

'; + + 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 = '

error

You have not yet filled in the SALT value in the config.inc.php file.

'; - } else if (! is_writable(CACHE)) { - Tools::logm('you don\'t have write access on cache directory'); - $msg = '

error

You don\'t have write access on cache directory.

'; } else if (STORAGE == 'sqlite' && ! file_exists(STORAGE_SQLITE)) { Tools::logm('sqlite file doesn\'t exist'); $msg = '

error

sqlite file doesn\'t exist, you can find it in install folder. Copy it in /db folder.

'; - } else if (file_exists(ROOT . '/install/update.php') && ! DEBUG_POCHE) { - $msg = '

setup

It\'s your first time here? Please copy /install/poche.sqlite in db folder. Then, delete install folder.
If you have already installed poche, an update is needed by clicking here.

'; } else if (is_dir(ROOT . '/install') && ! DEBUG_POCHE) { - $msg = '

setup

If you want to update your poche, you just have to delete /install folder.
To install your poche with sqlite, copy /install/poche.sqlite in /db and delete the folder /install. you have to delete the /install folder before using poche.

'; + $msg = '

install folder

you have to delete the /install folder before using poche.

'; } else if (STORAGE == 'sqlite' && ! is_writable(STORAGE_SQLITE)) { Tools::logm('you don\'t have write access on sqlite file'); $msg = '

error

You don\'t have write access on sqlite file.

';