'; $day = (int)date('d'); --$day; $yesterday = date("y/m/" . sprintf('%2u', $day)); $commit_log = "cvs@$project.mozdev.org"; if(!$local_conf_commits) { print '' . $local_conf_commits_msg . "\n"; } // $today = "03/02/14"; // $today = $yesterday; // echo $today . '

'; // $today = "03/02/21"; // 03/02/01 // $today = "[0-9]{2}/[0-9]{2}/[0-9]{2}"; //BEGIN BLOCK if(file_exists(COMMIT_PATH.$commit_log) && $local_conf_commits) { $size = filesize(COMMIT_PATH.$commit_log); // echo $size; $contents = array(); if ($size > MAX_READ_SIZE) { // print "\n"; $fp = fopen (COMMIT_PATH.$commit_log, "r"); fseek($fp, $size - MAX_READ); if ($contents) { print "$contents\n"; exit; } $tok = strtok(fread($fp, MAX_READ),"\n"); while ($tok) { array_push($contents, $tok); $tok = strtok("\n"); } fclose($fp); } if (!$contents) { $contents = file(COMMIT_PATH.$commit_log); } // echo $contents[0]; // preprocess Tag: stuff would be here if it didn't mess // things up completely $len=count($contents); // echo $len; $_project = $project; if ( !isset($doNotCapitalise) ) { $_project = PROJECT; } print '

' . "Today's CVS Commits for " . $_project . " Project

\n"; print '' . "\n"; function cvs_parse ($contents, $today, $i, $len) { if(ereg(" Date: $today", $contents[$i])) { $yy = substr(YEAR, 0, 2); $_timestamp = str_replace('Date: ', '', ltrim($contents[$i])); $_timestamp = str_replace("\n", '', $_timestamp); $_ts_link = $yy . ereg_replace('[\ \/]', '_', $_timestamp); $_timestamp = ''; $result = '\n" . '' . '\n" . '\n"; } return $result; } if($len) { for($i=0;$i<$len;$i++) { if(ereg("Modified: www", $contents[$i]) && !$local_conf_commits) break; $result[$i] = cvs_parse($contents, $today, $i, $len); } } if(!$result) { print '' . "\n"; } else { $reversed=array_reverse($result); for($i=0;$i\n\n"; } //END BLOCK ?>
' . "\n"; //who $result .= "" . $_timestamp . htmlspecialchars($contents[$i-1]) . "\n" . // who "
' . "\n"; $_time = htmlspecialchars($contents[$i]); // when $result .= '' . $_time . ''; // when $result .= "\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:", $contents[$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' ? 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 { // if ( strstr($checkins[$Y-2], '-') && strstr($checkins[$Y-1], 'New') && strstr($checkins[$Y], 'directory') ) { // $checkins .= '**'; $checkins = str_replace('- New directory', '-_New_directory', $checkins); $webcvs = 'http://www.mozdev.org/source/browse'; } $_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 ( !empty($_path)) { //$checkins .= '!empty($_path)'; $webcvs = 'http://www.mozdev.org/source/browse/' . $project; // reset important ! $webcvs .= '/' . $_path; $_path_ = $_path; $checkins .= ' ' . $_path . ''; } $Y = count($checkinsA); for($y=0; $y < $Y; ++$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 .= '
' . $checkins . "
\n"; // what } $result .= "
There are no new commits today