diff options
author | tcitworld <tcit@tcit.fr> | 2014-08-21 16:28:16 +0200 |
---|---|---|
committer | tcitworld <tcit@tcit.fr> | 2014-08-21 16:28:16 +0200 |
commit | a9bbe11169a89195aeb72ecddd1e000276b5bf72 (patch) | |
tree | c22a01e5736fd8e9b41a545393c0ae97596667d3 /inc | |
parent | 051f7fb28c312519419f41025c9a83b6befb91bc (diff) | |
parent | 211068ce504c48ee95e742a12ec04f16f3988c6c (diff) | |
download | wallabag-a9bbe11169a89195aeb72ecddd1e000276b5bf72.tar.gz wallabag-a9bbe11169a89195aeb72ecddd1e000276b5bf72.tar.zst wallabag-a9bbe11169a89195aeb72ecddd1e000276b5bf72.zip |
Merge pull request #814 from wallabag/fix-issue813
vendor dir is not accessible before install, sqlite db dir write check moved into db class
Diffstat (limited to 'inc')
-rwxr-xr-x | inc/poche/Database.class.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 2c80b64b..dfd7ae34 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -23,6 +23,10 @@ class Database { | |||
23 | { | 23 | { |
24 | switch (STORAGE) { | 24 | switch (STORAGE) { |
25 | case 'sqlite': | 25 | case 'sqlite': |
26 | // Check if /db is writeable | ||
27 | if ( !is_writable(STORAGE_SQLITE) || !is_writable(dirname(STORAGE_SQLITE))) { | ||
28 | die('An error occured: "db" directory must be writeable for your web server user!'); | ||
29 | } | ||
26 | $db_path = 'sqlite:' . STORAGE_SQLITE; | 30 | $db_path = 'sqlite:' . STORAGE_SQLITE; |
27 | $this->handle = new PDO($db_path); | 31 | $this->handle = new PDO($db_path); |
28 | break; | 32 | break; |