]> git.pld-linux.org Git - projects/buildlogs.git/blobdiff - index.php
Silence php notices.
[projects/buildlogs.git] / index.php
index d3583843b36b820ed234ea832544c40f2ae44289..357a9f18736d8617d571d34d29eb1e415507718b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,4 +1,7 @@
 <?php
+if (!function_exists("ob_gzhandler"))
+  die("ob_gzhandler function is missing - install php zlib module");
+
 ob_start("ob_gzhandler", 1);
 $buildlogs_server = "buildlogs.pld-linux.org";
 $url = "index.php";
@@ -17,6 +20,7 @@ $langs["en_US"]["charset"]="ISO-8859-1";
 $langs["pl_PL"]["charset"]="ISO-8859-2";
 
 $lang="en_US";
+$lang_detected="";
 if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
 {
   $rows=explode(";",$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
@@ -293,8 +297,13 @@ function dump_log($tail)
 
        $df = preg_replace("/.*\/([^\/]*)$/", "\\1", $f);
        $df = preg_replace("/\.(bz2|gz)$/", "", $df);
+       list($name, $id) = explode(',', $df);
 
-       echo "<h1>$df</h1>";
+       if ($name != 'command') {
+               $gitweb_url = "http://git.pld-linux.org/?p=packages/$name.git;a=summary";
+               $name = "<a href=\"$gitweb_url\">$name</a>";
+       }
+       echo "<h1>$name <small>$id</small></h1>";
 
        echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#000000\" width=\"100%\">";
 
@@ -361,6 +370,7 @@ function dump_log($tail)
        $time = "";
        $out_buf = array();
        $out_buf_size = 0;
+       $err_count = 0;
        while (($s = fgets($fd, 102400)) != false) {
 
                $toc_elem = false;
@@ -374,7 +384,7 @@ function dump_log($tail)
                        $toc_elem = "error $err_count";
                        $err_elem = $s;
                        $s = "<span class=error id=error-$err_count>$s</span>";
-               } elseif (preg_match("/(?:undefined reference to)/i", $s)) {
+               } elseif (preg_match("/(?:undefined reference to|recipe for target '.*?' failed)/i", $s)) {
                        $first_cut = true;
                        $err_count++;
                        $toc_elem = "error $err_count";
@@ -918,8 +928,7 @@ function welcome()
 <?=_("Feel free to email bug reports, complaints and feature requests ")?>
 <!-- ech... niech strace... -->
 <a href="mailto:feedback@pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
-<a href="mailto:feedback@pld-linux.org"><?=_("welcome")?></a> ;)</p>
-<p>Version: $Id: index.php,v 1.37 2014/10/20 12:59:06 glen Exp $</p>
+ <a href="mailto:feedback@pld-linux.org"><?=_("welcome")?></a> ;)</p>
 </td><td width="20%">&nbsp;</td></tr>
 </table>
 <?php
This page took 0.100933 seconds and 4 git commands to generate.