diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-09-04 14:11:36 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-09-04 14:11:36 +0000 |
commit | 38360ef3f63160620ac1ece51f1e066357ceb61e (patch) | |
tree | a9ba2945da53690c4c4d9610abc0c23a78dd4f6f /test_index.php | |
parent | 5489aa8bf3b28e856b28513a236f37e1e0ed610f (diff) | |
download | pkgsubmit-38360ef3f63160620ac1ece51f1e066357ceb61e.tar pkgsubmit-38360ef3f63160620ac1ece51f1e066357ceb61e.tar.gz pkgsubmit-38360ef3f63160620ac1ece51f1e066357ceb61e.tar.bz2 pkgsubmit-38360ef3f63160620ac1ece51f1e066357ceb61e.tar.xz pkgsubmit-38360ef3f63160620ac1ece51f1e066357ceb61e.zip |
skip packages with no name
Diffstat (limited to 'test_index.php')
-rw-r--r-- | test_index.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test_index.php b/test_index.php index f9121c8..7460d52 100644 --- a/test_index.php +++ b/test_index.php @@ -33,7 +33,7 @@ require __DIR__ . '/lib.php'; if (!is_dir($upload_dir)) { $msg = "$upload_dir does not exist on this system. Please check your config."; error_log($msg); - //die($msg); + die($msg); } $g_user = isset($_GET['user']) ? htmlentities(strip_tags($_GET['user'])) : null; @@ -281,6 +281,10 @@ T; if ($total > 0) { foreach ($pkgs as $key => $p) { + if (trim($p['package']) == '') { + continue; + } + $s .= sprintf($tmpl, $p['type'], timediff(key2timestamp($key)) . ' ago', @@ -346,7 +350,7 @@ if ($total > 0) { $s .= '<table style="width: 100%"><caption>Stats.</caption><tr><th colspan="2">Status</th><th>Count</th><th>%</th></tr>'; foreach ($stats as $k => $v) { - $s .= sprintf('<tr class="%s"><td class="status-box"></td><td class="number">%s</td><td>%d</td><td class="percent">%d%%</td></tr>', + $s .= sprintf('<tr class="%s"><td class="status-box"></td><td class="number">%s</td><td class="number">%d</td><td class="percent">%d%%</td></tr>', $k, $k, $v, round($v/$total*100)); } |