buildlogs: index.php - fix html typo; add links to rpm changelogs

glen glen at pld-linux.org
Mon Oct 20 14:59:11 CEST 2014


Author: glen                         Date: Mon Oct 20 12:59:11 2014 GMT
Module: buildlogs                     Tag: HEAD
---- Log message:
- fix html typo; add links to rpm changelogs

---- Files affected:
buildlogs:
   index.php (1.36 -> 1.37) 

---- Diffs:

================================================================
Index: buildlogs/index.php
diff -u buildlogs/index.php:1.36 buildlogs/index.php:1.37
--- buildlogs/index.php:1.36	Sat Oct 18 12:30:03 2014
+++ buildlogs/index.php	Mon Oct 20 14:59:06 2014
@@ -110,6 +110,9 @@
 	color: #111;
 	background-color: #161;
 }
+.changelog a {
+	color: #fff;
+}
 //-->
 </style>
  </head>
@@ -293,7 +296,7 @@
 
 	echo "<h1>$df</h1>";
 
-	echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#000000\" width="\100%\">";
+	echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#000000\" width=\"100%\">";
 
 	function one_item($h, $t) {
 		echo "<tr><td bgcolor=\"#ccccff\">$h:</td>".
@@ -382,6 +385,15 @@
 			$toc_elem = "make {$m['target']}";
 			$err_elem = $s;
 			$s = "<span class=line id=make-{$m['target']}>$s</span>";
+		} elseif (preg_match('/^(?P<line>- For complete changelog see:) (?P<link>.+)$/', $s, $m)) {
+			// rpm changelog link
+			$link = "<a href=\"{$m['link']}\">{$m['link']}</a>";
+			$s = "<span class=changelog>{$m['line']} $link<br/></span>";
+		} elseif (preg_match('/^(?P<line>\* \w{3} \w{3} [ \d]{2} \d{4} .*?) (?P<hash>[a-z0-9]{7})$/', $s, $m)) {
+			// rpm changelogs
+			$url = "http://git.pld-linux.org/?p=packages/{$name_url}.git;a=commitdiff;h={$m['hash']}";
+			$link = "<a href=\"$url\">{$m['hash']}</a>";
+			$s = "<span class=changelog>{$m['line']} $link<br/></span>";
 		} 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.36&r2=1.37



More information about the pld-cvs-commit mailing list