From 80bbd251954928665af0521523652f2ae0190913 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 7 Nov 2010 09:05:55 +0100 Subject: fix for new repo name --- all.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'all.php') diff --git a/all.php b/all.php index 26283de..448751f 100644 --- a/all.php +++ b/all.php @@ -127,7 +127,21 @@ function report ($db) ? $rpms["devel-"]->ver : ""); - switch ($repo['sub']) { + if (strpos($repo['sub'], '-os') + || strpos($repo['sub'], '-base') + || strpos($repo['sub'], '-optional') + || strpos($repo['sub'], '-stable') + ) { + // For CentOS + $repotype = 'base'; + } else if (strpos($repo['sub'], 'testing')) { + $repotype = 'testing'; + } else if (strpos($repo['sub'], 'updates')) { + $repotype = 'updates'; + } else { + $repotype = $repo['sub']; + } + switch ($repotype) { case "base": if (isset($rpms[$repo['main']."-updates"])) { $display .= sprintf( @@ -155,17 +169,19 @@ function report ($db) break; case "updates": $display .= sprintf( - "%s-%s (updates)
", + "%s-%s (%s)
", $rpm->ver, - $rpm->rel + $rpm->rel, + $repo['sub'] ); $class = ($rpm->ver == $maxver ? "check" : "attn"); break; case "testing": $display .= sprintf( - "%s-%s (testing)
", + "%s-%s (%s)
", $rpm->ver, - $rpm->rel + $rpm->rel, + $repo['sub'] ); $class = ($rpm->ver == $maxver ? "info" : "attn"); break; -- cgit