--- cdn/www/sources.html 2003/02/21 14:45:08 1.61 +++ cdn/www/sources.html 2003/02/22 11:35:50 1.95 @@ -19,7 +19,7 @@ cvs -d :pserver:guest@mozdev.org:/cvs co ' . $local_conf_commits_msg . "\n"; //BEGIN BLOCK - if(file_exists(COMMIT_PATH.$commit_log) && $local_conf_commits) { - // if(file_exists('/tmp/commit_test') && $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'); @@ -64,19 +65,15 @@ cvs -d :pserver:guest@mozdev.org:/cvs co if (!$contents) { + // $contents = file(COMMIT_PATH.$commit_log); - // $contents = file('/tmp/commit_test'); + // $contents = file('/tmp/commit_test'); // echo 'boing '; echo $contents; } -/* echo '
';
+    // preprocess Tag: stuff
     
-    for($i=0; $i < count($contents); ++$i)
-    {
-      echo htmlspecialchars($contents[$i]);
-    }
+    // /preprocess Tag: stuff
     
-    echo '
';*/ - $len=count($contents); $r = -1; @@ -109,9 +106,8 @@ cvs -d :pserver:guest@mozdev.org:/cvs co $_timestamp = str_replace('Date: ', '', ltrim($contents[$i])); $_timestamp = str_replace("\n", '', $_timestamp); - // $_timestamp = str_replace(':', '.', $_timestamp); - $_ts_link = $yy . ereg_replace('[\ \/]', '_', $_timestamp); // \: + $_ts_link = $yy . ereg_replace('[\ \/]', '_', $_timestamp); $_timestamp = ''; @@ -124,7 +120,7 @@ cvs -d :pserver:guest@mozdev.org:/cvs co $_time = htmlspecialchars($contents[$i]); - $result[$r] .= '' . $_time . ''; // when + $result[$r] .= '' . $_time . ''; // when $result[$r] .= "\n\n" . '' . "\n"; @@ -139,36 +135,28 @@ cvs -d :pserver:guest@mozdev.org:/cvs co break; $checkins = eregi_replace("((https|http|mailto|ftp):\/\/[^[:space:]<>]{1,})", - '\\1', htmlspecialchars($contents[$l])); + "\\1", htmlspecialchars($contents[$l])); // ' Added: www/img background.png' // ' Modified: www cdn.css' // ' Removed: www/protected sources.html' // ' www/compact index.html' ? - if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("[[:space:]]{9}", $checkins) ) + if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("^[[:space:]]{9}", $checkins) ) { - $identifier = trim(substr($checkins, 0, 15)); // echo $identifier . '

'; + $identifier = trim(substr($checkins, 0, 15)); // may change to   group - $checkins = substr($checkins, 15); // echo $checkins . '

'; + $checkins = substr($checkins, 15); // find first non-space character // if > 16, chances are the files are in the directory defined in the previous line ? - $_16 = strpos($checkins, ' '); // echo '$_16 ' . $_16 . '

'; + $_16 = strpos($checkins, ' '); - $_path = substr( $checkins, 0, $_16); // echo $_path . '

'; + $_path = substr( $checkins, 0, $_16); - // if ( $_16 > 16 ) // not going to happen frequently : ) - $checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) ); - - $__path = trim($_path); - - if ( !empty( $__path ) ) - { - $chkA1 = $_path; - } + $checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) ); $checkinsA = explode(' ', $checkins); @@ -194,9 +182,22 @@ cvs -d :pserver:guest@mozdev.org:/cvs co for($y=0; $y < count($checkinsA); ++$y) { - if(!$checkinsA[$y] == 'Tag:') // && !$checkinsA[$y-1] == 'Tag:') + if (ereg('Tag:', $checkinsA[$y]) || ereg('Tag:', $checkinsA[$y-1]) || $_tag) + { + $TAG = true; + } + else + { + $TAG = false; + } + + if(!$TAG) { - $checkins .= ' '; + $checkins .= ' '; } else { @@ -205,7 +206,14 @@ cvs -d :pserver:guest@mozdev.org:/cvs co $checkins .= $checkinsA[$y]; - if(!$checkinsA[$y] == 'Tag:'): $checkins .= ''; endif; + if ( ereg("Tag\:$", trim($checkinsA[$y])) && empty($checkinsA[$y+1])) { + $_tag = true; + } + else { + $_tag = false; + } + + if(!$TAG): $checkins .= ''; endif; }