--- cdn/www/sources.html 2003/02/19 19:33:34 1.7
+++ cdn/www/sources.html 2003/02/23 11:42:01 1.111
@@ -1,25 +1,215 @@
+
+
+
+
+ The cdn source code can be accessed in either of the following ways:
+
+
+
+
';
+
+ $result[$r] = '\n" .
+ '' .
+ '' . "\n";
+
+ $_time = htmlspecialchars($contents[$i]);
+
+// when
+ $result[$r] .= '' . $_time . ''; // when
+
+ $result[$r] .= "\n |
\n" .
+ '' . "\n";
+
+ $webcvs = 'http://www.mozdev.org/source/browse/' . $project;
+
+ for($l=$i+1;$l<$len;$l++) {
+ if(ereg(" Revision Changes Path", $contents[$l]))
+ break;
+
+ if(ereg(" User:", $content[$l]))
+ break;
+
+ $checkins = eregi_replace("((https|http|mailto|ftp):\/\/[^[:space:]<>]{1,})",
+ "\\1", htmlspecialchars($contents[$l]));
+
+ // ' Added: www/img background.png'
+ // ' Modified: www cdn.css'
+ // ' Removed: www/protected sources.html'
+ // ' www/compact index.html'
+ // ' mozpos/downloads - New directory'
+
+ if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("^[[:space:]]{9}", $checkins) ||
+ strstr($checkins, "New directory")
+ ) {
+
+ if ( !strstr($checkins, "New directory") ) {
+ $identifier = trim(substr($checkins, 0, 15)); // may change to group
+
+ $checkins = substr($checkins, 15);
+ }
+ else {
+ $checkins = str_replace('- New directory', '-_New_directory', $checkins);
+
+ $webcvs = 'http://www.mozdev.org/source/browse';
+
+ unset($identifier);
+ }
+
+ $_16 = strpos($checkins, ' ');
+
+ $_path = substr( $checkins, 0, $_16);
+
+ $checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) );
+
+ $checkinsA = explode(' ', $checkins);
+
+ unset($checkins);
+
+ for($z=0; $z < count($checkinsA); ++$z) {
+ $checkinsA[$z] = trim($checkinsA[$z]);
+ }
+
+ if ( !empty($identifier) ) {
+ $checkins = $identifier;
+ }
- if(!$local_conf_commits)
+ if ( !empty($_path)) {
+ $webcvs = 'http://www.mozdev.org/source/browse/' . $project; // reset important !
+ $webcvs .= '/' . $_path;
+ $_path_ = $_path;
+ $checkins .= ' ' . $_path . '';
+ }
+
+ for($y=0; $y < count($checkinsA); ++$y) {
+
+ if (ereg('Tag:', $checkinsA[$y]) || ereg('Tag:', $checkinsA[$y-1]) || $_tag ||
+ strstr($checkinsA[$y], '-_New_directory')
+ ) {
+ $TAG = true;
+ }
+ else {
+ $TAG = false;
+ }
+
+ if (!$TAG) {
+ $checkins .= ' ';
+ }
+ else {
+ $checkins .= ' ';
+ }
+
+ $checkinsA[$y] = str_replace('-_New_directory', '- New directory', $checkinsA[$y]);
+
+ $checkins .= $checkinsA[$y];
+
+ if ( ereg("Tag\:$", trim($checkinsA[$y])) && empty($checkinsA[$y+1])) {
+ $_tag = true;
+ }
+ else {
+ $_tag = false;
+ }
+
+ if(!$TAG) {
+ $checkins .= '';
+ }
+
+ }
+
+ if ( $identifier == 'Removed:' ) {
+ $idRemoved = true;
+ }
+ else {
+ $idRemoved = false;
+ }
+
+ }
+
+// what
+ $result[$r] .= ' ' . $checkins . " \n"; // what
+ }
+
+ $result[$r] .= " |
\n";
+ }
+
+ return $result;
+}
+
+ // $today = '03/02/14';
+
+ if(!$local_conf_commits) {
print '' . $local_conf_commits_msg . "\n";
+ }
//BEGIN BLOCK
- if(file_exists(COMMIT_PATH.$commit_log) && $local_conf_commits) {
+ //
+ if(file_exists(COMMIT_PATH.$commit_log) && $local_conf_commits) {
+ // if(file_exists('/tmp/commit_test') && $local_conf_commits) {
$size = filesize(COMMIT_PATH.$commit_log);
+ // $size = filesize('/tmp/commit_test');
$contents = array();
if ($size > MAX_READ_SIZE) {
// print "\n";
@@ -36,47 +226,42 @@
$tok = strtok("\n");
}
fclose($fp);
- } // echo '' . $contents[0] . '
';
- if (!$contents)
+ }
+
+ if (!$contents) {
+ //
$contents = file(COMMIT_PATH.$commit_log);
+ // $contents = file('/tmp/commit_test'); // echo 'boing '; echo $contents;
+ }
+
+ // preprocess Tag: stuff
+
+ // /preprocess Tag: stuff
+
$len=count($contents);
- $r = -1;
-
- echo '' . $contents[0] . '
';
- print '' . "Today's CVS Commits for " . ucwords($project) . " Project
\n";
+ $_project = $project;
+
+ if ( !isset($doNotCapitalise) ) {
+ $_project = PROJECT;
+ }
+
+ print '' . "Today's CVS Commits for " . $_project . " Project
\n";
+ // print '' . "Yesterday's CVS Commits for " . $_project . " Project
\n";
+ // print '' . "Some day's CVS Commits for " . $_project . " Project
\n";
print '' . "\n";
if($len) {
for($i=0;$i<$len;$i++) {
- if(ereg("Modified: www", $contents[$l]) && !$local_conf_commits)
+ if(ereg("Modified: www", $contents[$i]) && !$local_conf_commits)
break;
- if(ereg(" Date: $today", $contents[$i])) {
- $r++;
- $result[$r] =
- '\n" .
- '' .
- '' . "\n" . htmlspecialchars($contents[$i]) .
- "\n |
\n" .
- "\n";
-
- for($l=$i+1;$l<$len;$l++) {
- if(ereg(" Revision Changes Path", $contents[$l]))
- break;
+//start of parse of commitlog for $today / $yesterday
- if(ereg(" User:", $contents[$l]))
- break;
+ $result = cvs_parse($today);
- $result[$r] .= eregi_replace("((http|mailto|ftp):\/\/[^[:space:]<>]{1,})",
- "\\1", htmlspecialchars($contents[$l])) .
- " \n";
- }
+// end of parse of commitlog for $today / $yesterday
- $result[$r] .= " |
\n";
- }
}
}