summaryrefslogtreecommitdiff
path: root/contrib/feed-browser/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/feed-browser/update.php')
-rw-r--r--contrib/feed-browser/update.php36
1 files changed, 2 insertions, 34 deletions
diff --git a/contrib/feed-browser/update.php b/contrib/feed-browser/update.php
index 2e12a0481c..ed7d6e47ef 100644
--- a/contrib/feed-browser/update.php
+++ b/contrib/feed-browser/update.php
@@ -16,6 +16,7 @@
*
*/
+require_once 'includes/functions.inc';
/*
A package entry looks like this:
@@ -35,13 +36,11 @@
Description: IPv4 link-local address allocator
*/
-error_reporting(E_ALL);
+check_database();
$start = time();
$p_count = 0;
-define('DB_FILENAME', './feeds.db');
-
$feeds = db_query("SELECT f_name, f_uri FROM feeds");
foreach($feeds as $feed)
@@ -172,35 +171,4 @@ function insert_ipkgs(&$package_info)
)");
}
-
-function db_query($query)
-{
- $result = FALSE;
-
- if($db_h = sqlite_open(DB_FILENAME))
- {
- $query_h = sqlite_query ($db_h, $query);
- $result = sqlite_fetch_all ($query_h, SQLITE_ASSOC);
- sqlite_close($db_h);
- }
-
- return $result;
-}
-
-
-function db_query_n($query)
-{
- $result = FALSE;
-
- if($db_h = sqlite_open(DB_FILENAME))
- {
- $query_h = sqlite_query ($db_h, $query);
- sqlite_close($db_h);
- }
-
- return $result;
-}
-
-
-
?>