buildlogs: index.php - add section links to processing files of each packag...

glen glen at pld-linux.org
Wed Mar 21 12:40:55 CET 2012


Author: glen                         Date: Wed Mar 21 11:40:55 2012 GMT
Module: buildlogs                     Tag: HEAD
---- Log message:
- add section links to processing files of each package too

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

---- Diffs:

================================================================
Index: buildlogs/index.php
diff -u buildlogs/index.php:1.17 buildlogs/index.php:1.18
--- buildlogs/index.php:1.17	Wed Mar 21 02:29:44 2012
+++ buildlogs/index.php	Wed Mar 21 12:40:49 2012
@@ -372,6 +372,10 @@
 			// rpm build section
 			$s = "<span class=section id={$m['section']}>$s</span>";
 			$toc[] = $m['section'];
+		} elseif (preg_match("/^Processing files: (?P<pkg>(?P<name>.+)-[^-]+-[^-]+)/", $s, $m)) {
+			// processing files
+			$s = "<span class=section id=files-{$m['name']}>$s</span>";
+			$toc[] = "files ".$m['name'];
 		}
 		echo $s;
 	}
@@ -383,7 +387,8 @@
 		echo "<h2>"._("Toc:")."</h2>";
 		echo "<ul class=toc>";
 		foreach ($toc as $section) {
-			echo "<li><a href=#{$section}>{$section}</a></li>";
+			$id = str_replace(" ", "-", $section);
+			echo "<li><a href=#{$id}>{$section}</a></li>";
 		}
 		echo "</ul>";
 	}
================================================================

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



More information about the pld-cvs-commit mailing list