1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-12 16:58:37 +00:00

vendor dir is not accessible before install, sqlite db dir write check moved into db class

This commit is contained in:
Maryana Rozhankivska 2014-08-21 17:17:36 +03:00
parent 70549136ba
commit 211068ce50
3 changed files with 5 additions and 6 deletions

View file

@ -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))) {
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;