[phpcvsview-cvs-updates] phpcvsview func_FileAnnotation.php,1.4,1.5
Status: Pre-Alpha
Brought to you by:
bcheesem
From: Brian C. <bch...@us...> - 2004-10-04 11:50:53
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2621 Modified Files: func_FileAnnotation.php Log Message: Major changes to XHTML generation logic. Index: func_FileAnnotation.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileAnnotation.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** func_FileAnnotation.php 3 Oct 2004 14:03:04 -0000 1.4 --- func_FileAnnotation.php 4 Oct 2004 11:50:31 -0000 1.5 *************** *** 50,64 **** $search = array('<', '>', '\n'); $replace = array("<", ">", ""); foreach ($CVSServer->ANNOTATION as $Annotation) { ! echo "<tr class=\"$RowClass\"><td><pre>".$Annotation["Revision"]."</pre></td><td><pre>".$Annotation["Author"]; ! echo "</pre></td><td><pre>".$Annotation["Date"]."</pre></td><td><pre>".str_replace($search, $replace, $Annotation["Line"])."</pre></td></tr>\n"; ! if ($RowClass == "row1") { ! $RowClass = "row2"; } else { ! $RowClass = "row1"; } } echo "</table><hr />\n"; --- 50,80 ---- $search = array('<', '>', '\n'); $replace = array("<", ">", ""); + $PrevRev = ""; + $FirstLine = true; foreach ($CVSServer->ANNOTATION as $Annotation) { ! if (strcmp($PrevRev, $Annotation["Revision"]) != 0) { ! if (!$FirstLine) { ! "</pre></td></tr>\n"; ! } ! else ! { ! $FirstLine = false; ! } ! echo "<tr class=\"$RowClass\"><td>".$Annotation["Revision"]."</td><td>".$Annotation["Author"]; ! echo "</td><td>".$Annotation["Date"]."</td><td><pre>".str_replace($search, $replace, $Annotation["Line"]); ! if ($RowClass == "row1") { ! $RowClass = "row2"; ! } ! else ! { ! $RowClass = "row1"; ! } } else { ! echo "\n".str_replace($search, $replace, $Annotation["Line"]); } + $PrevRev = $Annotation["Revision"]; } echo "</table><hr />\n"; |