summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--all.php26
-rw-r--r--rpm.php26
2 files changed, 42 insertions, 10 deletions
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(
- "<strong>%s</strong>-%s <small>(updates)</small><br/>",
+ "<strong>%s</strong>-%s <small>(%s)</small><br/>",
$rpm->ver,
- $rpm->rel
+ $rpm->rel,
+ $repo['sub']
);
$class = ($rpm->ver == $maxver ? "check" : "attn");
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']
);
$class = ($rpm->ver == $maxver ? "info" : "attn");
break;
diff --git a/rpm.php b/rpm.php
index 798cb29..ee16321 100644
--- a/rpm.php
+++ b/rpm.php
@@ -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";