]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
vendor dir is not accessible before install, sqlite db dir write check moved into... 814/head
authorMaryana Rozhankivska <mariroz@mr.lviv.ua>
Thu, 21 Aug 2014 14:17:36 +0000 (17:17 +0300)
committerMaryana Rozhankivska <mariroz@mr.lviv.ua>
Thu, 21 Aug 2014 14:17:36 +0000 (17:17 +0300)
check_setup.php [changed mode: 0644->0755]
inc/poche/Database.class.php
index.php

old mode 100644 (file)
new mode 100755 (executable)
index 7e378b1..cf02c34
@@ -5,11 +5,6 @@ if (! is_writable('cache')) {
     die('The directory "cache" must be writeable by your web server user');
 }
 
-// Check if /db is writeable
-if (! is_writable('db') && STORAGE === 'sqlite') {
-    die('The directory "db" must be writeable by your web server user');
-}
-
 // install folder still present, need to install wallabag
 if (is_dir('install')) {
     require('install/index.php');
index 2c80b64b5dff24687777be87754134057be01091..dfd7ae349052964680d90a680d8e0413b893ef59 100755 (executable)
@@ -23,6 +23,10 @@ class Database {
     {
         switch (STORAGE) {
             case 'sqlite':
+                // Check if /db is writeable
+                if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) {\r
+                       die('An error occured: "db" directory must be writeable for your web server user!');
+                }
                 $db_path = 'sqlite:' . STORAGE_SQLITE;
                 $this->handle = new PDO($db_path);
                 break;
index f191d7e7157f4822a5749685509e499c15f45a68..39990d55a7c59292f1a7ba78caa5dcbc146189e3 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -10,8 +10,8 @@
 
 define ('POCHE', '1.8.0');
 require 'check_essentials.php';
-require_once 'inc/poche/global.inc.php';
 require 'check_setup.php';
+require_once 'inc/poche/global.inc.php';
 
 // Start session
 Session::$sessionName = 'wallabag';