From e463be0c0c6028fbc5ad9fb90b386c73fe6427d4 Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Sun, 3 Apr 2011 19:25:45 +0200 Subject: [PATCH] web: fix counts Signed-off-by: Corentin Chary --- web/index.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/web/index.php b/web/index.php index d27ba45..a591970 100644 --- a/web/index.php +++ b/web/index.php @@ -35,7 +35,7 @@ if ($act == "home") { $color = $new == 0 ? 'green' : 'red'; echo ""; echo "{$row['category']}"; - echo "{$row['versions']}"; + echo "{$row['ebuilds']}"; echo "$new"; echo ""; } @@ -56,7 +56,7 @@ if ($act == "home") { $color = $new == 0 ? 'green' : 'red'; echo ""; echo "{$row['herd']}"; - echo "{$row['versions']}"; + echo "{$row['ebuilds']}"; echo "$new"; echo ""; } @@ -77,7 +77,7 @@ if ($act == "home") { $color = $new == 0 ? 'green' : 'red'; echo ""; echo "{$row['maintainer']}"; - echo "{$row['versions']}"; + echo "{$row['ebuilds']}"; echo "$new"; echo ""; } @@ -95,7 +95,7 @@ if ($act == "home") { $color = $new == 0 ? 'green' : 'red'; echo ""; echo "{$row['category']}"; - echo "{$row['versions']}"; + echo "{$row['ebuilds']}"; echo "$new"; echo ""; } @@ -138,7 +138,7 @@ if ($act == "home") { $color = $new == 0 ? 'green' : 'red'; echo ""; echo "$catpkg"; - echo "{$row['versions']}"; + echo "{$row['ebuilds']}"; echo "$new"; echo ""; } @@ -159,10 +159,12 @@ if ($act == "home") { $infos = $infos->fetchArray(); if ($infos) { + echo "

{$infos['category']}/${infos['package']}

"; + $sql = "SELECT * FROM versions WHERE package_id = ${infos['id']} AND packaged = 1"; $results = $db->query($sql); - echo '

Packaged versions:

    '; + echo '

    Packaged versions:

      '; while ($version = $results->fetchArray()) { echo "
    • ${version['version']}-${version['revision']}:${version['slot']}
    • "; } @@ -173,7 +175,7 @@ if ($act == "home") { $results = $db->query($sql); echo '
    '; - echo '

    Upstream versions:

      '; + echo '

      Upstream versions:

        '; while ($version = $results->fetchArray()) { echo "
      • ${version['version']} - ${version['url']}
      • ";