diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-11-07 09:05:55 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-11-07 09:05:55 +0100 |
commit | 80bbd251954928665af0521523652f2ae0190913 (patch) | |
tree | 1bffdf4d5a891301b37f6f6cb96b106c7349db6a /rpm.php | |
parent | db257c7de11da2771a9f61733f21a42c98cf2a97 (diff) |
fix for new repo name
Diffstat (limited to 'rpm.php')
-rw-r--r-- | rpm.php | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -149,7 +149,21 @@ function report($db, $type) $verpm .= strtolower($res[1]); } - 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( @@ -181,9 +195,10 @@ function report($db, $type) case "updates": $display .= sprintf( "<strong>%s</strong>-%s ". - "<small>(updates)</small><br/>", + "<small>(%s)</small><br/>", $rpm['ver'], - $rpm['rel'] + $rpm['rel'], + $repo['sub'] ); if ( $verup==$verpm ) { $class="check"; @@ -191,9 +206,10 @@ function report($db, $type) break; case "testing": $display .= sprintf( - "%s-%s <small>(testing)</small><br/>", + "%s-%s <small>(%s)</small><br/>", $rpm['ver'], - $rpm['rel'] + $rpm['rel'], + $repo['sub'] ); if ( $verup==$verpm ) { $class="info"; |