summaryrefslogtreecommitdiff
path: root/contrib/feed-browser/update.php
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2006-08-25 09:47:49 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2006-08-25 09:47:49 +0000
commit6cd8d8fa7a0e88cbf52e0ea4901ad9b4b4686cce (patch)
tree200f2d9feaec65dcb2a7a6838fcc324c254437e0 /contrib/feed-browser/update.php
parent4305ea8adac4c2ab1235553496a21e8c4c63a039 (diff)
feed-browser: moved functions to include/functions.inc, updater check/create database now
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;
-}
-
-
-
?>