diff options
Diffstat (limited to 'contrib/feed-browser/update.php')
-rw-r--r-- | contrib/feed-browser/update.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/contrib/feed-browser/update.php b/contrib/feed-browser/update.php index ed7d6e47ef..786e898494 100644 --- a/contrib/feed-browser/update.php +++ b/contrib/feed-browser/update.php @@ -16,6 +16,7 @@ * */ +require_once 'includes/config.inc'; require_once 'includes/functions.inc'; /* @@ -41,11 +42,11 @@ check_database(); $start = time(); $p_count = 0; -$feeds = db_query("SELECT f_name, f_uri FROM feeds"); +$feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds"); foreach($feeds as $feed) { - print("Updating {$feed['f_name']}: {$feed['f_uri']}: "); + print("Updating {$feed['f_name']}: "); db_query_n("DELETE FROM packages WHERE p_feed = '{$feed['f_name']}'"); $count = 0; @@ -58,8 +59,8 @@ foreach($feeds as $feed) 'name'=>'', 'version'=>'', 'arch'=>'', 'depends'=>'', 'maintainer'=>'', 'homepage'=>'', 'section'=>'', 'replaces'=>'', 'provides'=>'', 'recommends'=>'', 'conflicts'=>'', 'size'=>'', - 'md5sum'=>'', 'source'=>'', 'feed'=>'', 'file'=>'', 'desc'=>'' - ); + 'md5sum'=>'', 'source'=>'', 'feed'=>$feed['f_id'], 'file'=>'', 'desc'=>'' + ); while (!feof($packagesgz_h)) { @@ -74,7 +75,7 @@ foreach($feeds as $feed) 'name'=>'', 'version'=>'', 'arch'=>'', 'depends'=>'', 'maintainer'=>'', 'homepage'=>'', 'section'=>'', 'replaces'=>'', 'provides'=>'', 'recommends'=>'', 'conflicts'=>'', 'size'=>'', - 'md5sum'=>'', 'source'=>'', 'feed'=>'', 'file'=>'', 'desc'=>'' + 'md5sum'=>'', 'source'=>'', 'feed'=>$feed['f_id'], 'file'=>'', 'desc'=>'' ); } @@ -160,7 +161,7 @@ function insert_ipkgs(&$package_info) { db_query_n("INSERT INTO packages VALUES ( '{$package_info['name']}', '{$package_info['version']}', - '{$package_info['arch']}', '{$package_info['depends']}', + '{$package_info['arch']}', '{$package_info['depends']}', '{$package_info['maintainer']}', '{$package_info['homepage']}', '{$package_info['section']}', '{$package_info['replaces']}', '{$package_info['provides']}', '{$package_info['recommends']}', @@ -168,7 +169,7 @@ function insert_ipkgs(&$package_info) '{$package_info['md5sum']}', '{$package_info['source']}', '{$package_info['feed']}', '{$package_info['file']}', '{$package_info['desc']}' - )"); + )"); } ?> |