Author: glen                         Date: Wed Mar 21 11:45:09 2012 GMT
Module: buildlogs                     Tag: HEAD
---- Log message:
- add errors to toc

---- Files affected:
buildlogs:
   index.php (1.18 -> 1.19) 

---- Diffs:

================================================================
Index: buildlogs/index.php
diff -u buildlogs/index.php:1.18 buildlogs/index.php:1.19
--- buildlogs/index.php:1.18    Wed Mar 21 12:40:49 2012
+++ buildlogs/index.php Wed Mar 21 12:45:04 2012
@@ -356,6 +356,7 @@
        $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 @@
                $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>";
================================================================

---- CVS-web:
    http://cvs.pld-linux.org//buildlogs/index.php?r1=1.18&r2=1.19&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to