[llvm-commits] CVS: nightlytest-serverside/drawresultsgraph.php

Patrick Jenkins pjenkins at apple.com
Tue Aug 1 10:48:12 PDT 2006



Changes in directory nightlytest-serverside:

drawresultsgraph.php updated: 1.1.1.1 -> 1.2
---
Log message:

The data in the database had html line breaks in it which caused regular expresions not to match. I do a search and replace for s/<br>/ / before performing regular expressions now. This problem caused graphs to be generated with error messages because there was seemingly no data.


---
Diffs of the changes:  (+5 -2)

 drawresultsgraph.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


Index: nightlytest-serverside/drawresultsgraph.php
diff -u nightlytest-serverside/drawresultsgraph.php:1.1.1.1 nightlytest-serverside/drawresultsgraph.php:1.2
--- nightlytest-serverside/drawresultsgraph.php:1.1.1.1	Wed Jul  5 15:56:33 2006
+++ nightlytest-serverside/drawresultsgraph.php	Tue Aug  1 12:47:56 2006
@@ -231,7 +231,7 @@
 
 	$data_max=-1;
 
-	
+	$regexp = "/$preg_measure:\s*([0-9\.]+|\?)/";
 	while($row=mysql_fetch_array($night_table_query)){
 		$night_id = $row['night'];
 		$query = mysql_query("select added from night where id=$night_id") or die(mysql_error());
@@ -241,7 +241,10 @@
 		
 		$seconds = mktime($pjs[4], $pjs[5], $pjs[6], $pjs[2], $pjs[3],$pjs[1]);
 		
-		$regexp = "/$preg_measure:\s*([0-9\.]+|\?)/";
+		if($DEBUG){
+		  print "searching for $regexp <br>\n";
+		}
+		$row['result']=str_replace("<br>", " ", "{$row['result']}");
 		preg_match($regexp, "{$row['result']}", $ans);	
 		
 		if(isset($ans[1])){






More information about the llvm-commits mailing list