summaryrefslogtreecommitdiff
path: root/contrib/feed-browser/includes/functions.inc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/feed-browser/includes/functions.inc')
-rw-r--r--contrib/feed-browser/includes/functions.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/feed-browser/includes/functions.inc b/contrib/feed-browser/includes/functions.inc
index 5549aa578d..ad8e57e93b 100644
--- a/contrib/feed-browser/includes/functions.inc
+++ b/contrib/feed-browser/includes/functions.inc
@@ -422,8 +422,12 @@ function sectionslist()
function check_database()
{
- if($db = sqlite_open(DB_FILENAME))
+ $db_exists = FALSE;
+
+ if(file_exists(DB_FILENAME) AND $db = sqlite_open(DB_FILENAME))
{
+ $db_exists = TRUE;
+
//initialize db
if (db_table_exists ($db, 'packages') === FALSE)
{
@@ -461,6 +465,8 @@ function check_database()
sqlite_close($db);
}
+
+ return $db_exists;
}