From 3c22a10c40837b1695ae04d120bbfc68da01059c Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Tue, 8 Jun 2010 20:04:48 +0200
Subject: add TableRRepo class and use it

---
 refresh.php | 43 +++----------------------------------------
 1 file changed, 3 insertions(+), 40 deletions(-)

(limited to 'refresh.php')

diff --git a/refresh.php b/refresh.php
index 53aef84..7547883 100644
--- a/refresh.php
+++ b/refresh.php
@@ -508,47 +508,10 @@ try {
 
     // -------------------------------------------------------------------
     if ($_SERVER['argc']==1 || in_array('R', $_SERVER['argv'])) {
-
-        $repos = array(
-            array(
-                "name"  => "R",
-                "state" => "stable",
-                "url"   => "http://cran.at.r-project.org/src/contrib/PACKAGES"
-            ),
-            //array("name"=>"R-forge","state"=>"unstable", "url" => "http://r-forge.r-project.org/src/contrib/PACKAGES"),
-            array(
-                "name"  => "biocp",
-                "state" => "stable",
-                "url"   => "http://www.bioconductor.org/packages/release/bioc/src/contrib/PACKAGES"
-            ),
-            array(
-                "name"  => "biocp",
-                "state" => "unstable",
-                "url"   => "http://www.bioconductor.org/packages/devel/bioc/src/contrib/PACKAGES"
-            ),
-            array(
-                "name"  => "bioca",
-                "state" => "stable",
-                "url"   => "http://www.bioconductor.org/packages/release/data/annotation/src/contrib/PACKAGES"
-            ),
-            array(
-                "name"  => "bioca",
-                "state" => "unstable",
-                "url"   => "http://www.bioconductor.org/packages/devel/data/annotation/src/contrib/PACKAGES"
-            ),
-            array(
-                "name"  => "bioce",
-                "state" => "stable",
-                "url"   => "http://www.bioconductor.org/packages/release/data/experiment/src/contrib/PACKAGES"
-            ),
-            array(
-                "name"  => "bioce",
-                "state" => "unstable",
-                "url"   => "http://www.bioconductor.org/packages/devel/data/experiment/src/contrib/PACKAGES"
-            )
-        );
+//
         $tottot=0;
-        foreach ($repos as $repo) {
+        $pear = new TableRRepo($db);
+        foreach ($pear->request() as $repo) {
             echo date("r : ") . "Reading " . $repo["name"] . " (" .
                 $repo["state"] . ")\n";
             $index = @file_get_contents($repo["url"]);
-- 
cgit