version 1.7, 2003/02/19 19:33:34
|
version 1.26, 2003/02/20 21:06:24
|
Line 1
|
Line 1
|
|
<!-- MAIN CONTENT --> |
|
<h5 class="page-header">Source Code</h5> |
|
|
|
<p> |
|
The cdn source code can be accessed in either of the following ways: |
|
</p> |
|
|
|
<ul> |
|
<li>View the source using the CVS <a href="http://www.mozdev.org/source/browse/cdn/">web interface</a></li> |
|
<li>Check out the source using anonymous CVS with the following commands (password is guest): |
|
|
|
<pre> |
|
cvs -d :pserver:guest@mozdev.org:/cvs login |
|
cvs -d :pserver:guest@mozdev.org:/cvs co cdn |
|
</pre> |
|
|
|
</li> |
|
</ul><?php $doNotCapitalise = 1; ?> |
|
|
<?php |
<?php |
|
|
// $Id$ |
// $Id$ |
Line 10
|
Line 29
|
$today = date("y/m/d"); |
$today = date("y/m/d"); |
$commit_log = "cvs@$project.mozdev.org"; |
$commit_log = "cvs@$project.mozdev.org"; |
|
|
// | // show_source(COMMIT_PATH.$commit_log); |
show_source(COMMIT_PATH.$commit_log); | |
|
|
if(!$local_conf_commits) |
if(!$local_conf_commits) |
print '<span id="CVS-local-conf-commits">' . $local_conf_commits_msg . "</span>\n"; |
print '<span id="CVS-local-conf-commits">' . $local_conf_commits_msg . "</span>\n"; |
Line 42
|
Line 60
|
$len=count($contents); |
$len=count($contents); |
$r = -1; |
$r = -1; |
|
|
echo '<pre style="color: red;">' . $contents[0] . '</pre>'; | // echo '<pre style="color: red;">' . $contents[0] . '</pre>'; |
| |
| $_project = $project; |
|
|
print '<h4 id="CVS-h4">' . "Today's CVS Commits for " . ucwords($project) . " Project</h4>\n"; | if ( !isset($doNotCapitalise) ) |
| { |
| $_project = PROJECT; |
| } |
| |
| print '<h4 id="CVS-h4">' . "Today's CVS Commits for " . $_project . " Project</h4>\n"; |
print '<table border="0" cellpadding="0" cellspacing="2" id="CVS-table">' . "\n"; |
print '<table border="0" cellpadding="0" cellspacing="2" id="CVS-table">' . "\n"; |
|
|
if($len) { |
if($len) { |
Line 58
|
Line 83
|
'<tr class="CVS-tr-header" valign="top"><td class="CVS-td-900">' . "\n" . |
'<tr class="CVS-tr-header" valign="top"><td class="CVS-td-900">' . "\n" . |
"<strong>" . htmlspecialchars($contents[$i-1]) . "</strong>\n" . |
"<strong>" . htmlspecialchars($contents[$i-1]) . "</strong>\n" . |
"</td></tr>\n" . |
"</td></tr>\n" . |
'<tr class="CVS-tr-checkins">' . | '<tr class="CVS-tr-date">' . |
'<td class="CVS-td-f90">' . "\n" . htmlspecialchars($contents[$i]) . |
'<td class="CVS-td-f90">' . "\n" . htmlspecialchars($contents[$i]) . |
"\n</td></tr>\n" . |
"\n</td></tr>\n" . |
"<tr><td>\n"; | '<tr class="CVS-tr-checkins"><td class="CVS-td-checkins">' . "\n"; |
|
|
for($l=$i+1;$l<$len;$l++) { |
for($l=$i+1;$l<$len;$l++) { |
if(ereg(" Revision Changes Path", $contents[$l])) |
if(ereg(" Revision Changes Path", $contents[$l])) |
Line 70
|
Line 95
|
if(ereg(" User:", $contents[$l])) |
if(ereg(" User:", $contents[$l])) |
break; |
break; |
|
|
$result[$r] .= eregi_replace("((http|mailto|ftp):\/\/[^[:space:]<>]{1,})", | $checkins = eregi_replace("((https|http|mailto|ftp):\/\/[^[:space:]<>]{1,})", |
"<a href='\\1'>\\1</a>", htmlspecialchars($contents[$l])) . | "<a href='\\1'>\\1</a>", htmlspecialchars($contents[$l])); |
"<br>\n"; | |
| // ' Added: www/img background.png' |
| // ' Modified: www cdn.css' |
| // ' Removed: www/protected sources.html' |
| // ' www/compact index.html' ? |
| |
| $webcvs = 'http://www.mozdev.org/source/browse/' . $project; // . '/'; |
| |
| if ( ereg("((Added|Modified|Removed):)", $checkins) || eregi("[^[:space:]<>]+/+[^[:space:]<>]", $checkins) ) |
| { |
| $checkins = trim($checkins); |
| |
| $checkins = ereg_replace('[[:space:]]{1,}', ' ', $checkins); |
| |
| $checkinsA = explode(' ', $checkins); |
| |
| unset($checkins); |
| |
| for($z=0; $z < count($checkinsA); ++$z) |
| { |
| $checkinsA[$z] = trim($checkinsA[$z]); |
| } |
| |
| $chkA1 = $checkinsA[1]; |
| |
| $webcvs .= '/' . $chkA1; |
| |
| $checkins = $checkinsA[0]; |
| |
| if(eregi("[^[:space:]<>]+/+[^[:space:]<>]", $checkinsA[0])) |
| { |
| $checkins = <a href="' . $webcvs . $checkinsA[0] . '">' . $checkinsA[0] . '</a>'; |
| } |
| |
| $checkins .= ' <a href="' . $webcvs; |
| $checkins .= '">' . $chkA1 . '</a>'; |
| |
| // reset($checkinsA); |
| for($y=0; $y < count($checkinsA); ++$y) |
| { |
| // how can $webcvs not have $chkA1 as part of it ? |
| |
| if($y >= 2) |
| { |
| $checkins .= ' <a href="' . $webcvs . '/' . $checkinsA[$y] . '">'; |
| $checkins .= $checkinsA[$y] . '</a>'; |
| } |
| } |
| } |
| |
| $result[$r] .= '<div class="CVS-div-checkins">' . $checkins . |
| "</div>\n"; |
} |
} |
|
|
$result[$r] .= "</td></tr>\n"; |
$result[$r] .= "</td></tr>\n"; |