[Mageia-dev] [soft-commits] [5642] skip packages with no name

Thierry Vignaud thierry.vignaud at gmail.com
Tue Sep 4 16:56:21 CEST 2012


On 4 September 2012 16:11,  <root at mageia.org> wrote:
> Revision 5642 Author rda Date 2012-09-04 16:11:36 +0200 (Tue, 04 Sep 2012)
>
> Log Message
>
> skip packages with no name

Is that possible?

> Modified: build_system/web/test_index.php
> ===================================================================
> --- build_system/web/test_index.php	2012-09-04 14:02:39 UTC (rev 5641)
> +++ build_system/web/test_index.php	2012-09-04 14:11:36 UTC (rev 5642)
> @@ -33,7 +33,7 @@
>  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 @@
>
>  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 @@
>
>      $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));


More information about the Mageia-dev mailing list