]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
change instructions messages
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Thu, 3 Oct 2013 12:23:03 +0000 (14:23 +0200)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Thu, 3 Oct 2013 12:23:03 +0000 (14:23 +0200)
inc/poche/Poche.class.php

index 1bae275185298133ae1b6228ecec63eda329dc31..d6dbd19a41832cb97db47565748413131d0c62f4 100644 (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>';