]> git.pld-linux.org Git - projects/buildlogs.git/commitdiff
- add errors to toc
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 21 Mar 2012 11:45:04 +0000 (11:45 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Wed, 21 Mar 2012 11:45:04 +0000 (11:45 +0000)
index.php

index 0012f2107e184553fa217e17a39c16507afd11bd..bec4587a4eadfe1554993e6122c97d66d2670975 100644 (file)
--- a/index.php
+++ b/index.php
@@ -356,6 +356,7 @@ function dump_log($tail)
        $fd = popen($cmd, "r");
        $toc = array();
        ob_start();
+       $err_count = 0;
        while (($s = fgets($fd, 102400)) != false) {
                if (strlen($s) > 800) {
                        $s = chunk_split($s, 800, "\n    ");
@@ -364,7 +365,9 @@ function dump_log($tail)
                $s = htmlspecialchars($s);
                // highlight errors
                if (preg_match("/errors?:/i", $s)) {
-                       $s = "<span class=error>$s</span>";
+                       $err_count++;
+                       $s = "<span class=error id=error-$err_count>$s</span>";
+                       $toc[] = "error $err_count";
                } elseif (substr($s, 0, 2) == "+ ") {
                        // shell verbose
                        $s = "<span class=verbose>$s</span>";
@@ -477,7 +480,7 @@ function list_archs()
                "alt=\""._("Powered by PLD Linux")."\" border=\"0\" /></a><br />\n" .
             "<small>(c) 2002 ".
             "<a href=\"mailto:feedback@pld-linux.org\">PLD&nbsp;Team</a><br />\n".
-            '$Revision: 1.17 $'.
+            '$Revision: 1.18 $'.
             "</small></div>\n";
 
        # smile ;)
@@ -850,7 +853,7 @@ function welcome()
 <!-- 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.17 2012/03/21 01:29:44 glen Exp $</p>
+<p>Version: $Id: index.php,v 1.18 2012/03/21 11:40:49 glen Exp $</p>
 </td><td width="20%">&nbsp;</td></tr>
 </table>
 <?php
This page took 0.063947 seconds and 4 git commands to generate.