didou Fri Oct 29 10:20:44 2004 EDT
Modified files: /phpdoc/scripts revcheck.php Log: Index: scripts/revcheck.php http://cvs.php.net/diff.php/phpdoc/scripts/revcheck.php?r1=1.47&r2=1.48&ty=u Index: phpdoc/scripts/revcheck.php diff -u phpdoc/scripts/revcheck.php:1.47 phpdoc/scripts/revcheck.php:1.48 --- phpdoc/scripts/revcheck.php:1.47 Sun Sep 5 18:11:53 2004 +++ phpdoc/scripts/revcheck.php Fri Oct 29 10:20:44 2004 @@ -727,6 +727,8 @@ // Files table goes here // ========================================================================= +if (count($files_status) != 0) { + print <<<END_OF_MULTILINE <a name="files"></a> <table width="820" border="0" cellpadding="4" cellspacing="1" align="center"> @@ -751,70 +753,72 @@ </tr> END_OF_MULTILINE; -// This was the previous directory [first] -$prev_dir = $new_dir = $DOCDIR."en"; - -// Go through all files collected -foreach ($files_status as $num => $file) { - - // Make the maintainer a link, if we have that maintainer in the list - if (isset($maint_by_nick[$file["maintainer"]])) { - $file["maintainer"] = '<a href="#maint' . $maint_by_nick[$file["maintainer"]] . - '">' . $file["maintainer"] . '</a>'; - } - - // If we have a 'numeric' revision diff and it is not zero, - // make a link to the CVS repository's diff script - if ($file["revision"][2] != "n/a" && $file["revision"][2] !== 0) { - $file["short_name"] = "<a href=\"http://cvs.php.net/diff.php/" . - preg_replace( "'^".$DOCDIR."'", "phpdoc/", $file["full_name"]) . - "?r1=" . $file["revision"][1] . - "&r2=" . $file["revision"][0] . - CVS_OPT . "\">" . $file["short_name"] . "</a>"; - } - - // Guess the new directory from the full name of the file - $new_dir = dirname($file["full_name"]); - - // If this is a new directory, put out old dir lines - if ($new_dir != $prev_dir && isset($lines)) { - echo $prev_diplay_dir; - echo " ($line_number)</th></tr>"; - echo $lines; - - $lines = ''; - $line_number = 0; - - // Store the new actual directory - $prev_dir = $new_dir; - } - // Drop out the unneeded parts from the dirname... - $display_dir = str_replace($DOCDIR."en/", "", dirname($file["full_name"])); - $prev_diplay_dir = "<tr class=blue><th colspan=12>$display_dir"; - - // Save the line for the current file (get file name shorter) - $lines .= "<tr class={$CSS[$file['mark']]}><td>{$file['short_name']}</td>". - "<td> {$file['revision'][0]}</td>" . - "<td> {$file['revision'][1]}</td>". - "<td class=rb>{$file['revision'][2]} </td>". - "<td class=r>{$file['size'][0]} </td>". - "<td class=r>{$file['size'][1]} </td>". - "<td class=rb>{$file['size'][2]} </td>". - "<td class=r>{$file['date'][0]} </td>". - "<td class=r>{$file['date'][1]} </td>". - "<td class=rb>{$file['date'][2]} </td>". - "<td class=c>{$file['maintainer']}</td>". - "<td class=c>".trim($file['status'])."</td></tr>\n"; - $line_number++; - + // This was the previous directory [first] + $prev_dir = $new_dir = $DOCDIR."en"; + + // Go through all files collected + foreach ($files_status as $num => $file) { + + // Make the maintainer a link, if we have that maintainer in the list + if (isset($maint_by_nick[$file["maintainer"]])) { + $file["maintainer"] = '<a href="#maint' . $maint_by_nick[$file["maintainer"]] . + '">' . $file["maintainer"] . '</a>'; + } + + // If we have a 'numeric' revision diff and it is not zero, + // make a link to the CVS repository's diff script + if ($file["revision"][2] != "n/a" && $file["revision"][2] !== 0) { + $file["short_name"] = "<a href=\"http://cvs.php.net/diff.php/" . + preg_replace( "'^".$DOCDIR."'", "phpdoc/", $file["full_name"]) . + "?r1=" . $file["revision"][1] . + "&r2=" . $file["revision"][0] . + CVS_OPT . "\">" . $file["short_name"] . "</a>"; + } + + // Guess the new directory from the full name of the file + $new_dir = dirname($file["full_name"]); + + // If this is a new directory, put out old dir lines + if ($new_dir != $prev_dir && isset($lines)) { + echo $prev_diplay_dir; + echo " ($line_number)</th></tr>"; + echo $lines; + + $lines = ''; + $line_number = 0; + + // Store the new actual directory + $prev_dir = $new_dir; + } + // Drop out the unneeded parts from the dirname... + $display_dir = str_replace($DOCDIR."en/", "", dirname($file["full_name"])); + $prev_diplay_dir = "<tr class=blue><th colspan=12>$display_dir"; + + // Save the line for the current file (get file name shorter) + $lines .= "<tr class={$CSS[$file['mark']]}><td>{$file['short_name']}</td>". + "<td> {$file['revision'][0]}</td>" . + "<td> {$file['revision'][1]}</td>". + "<td class=rb>{$file['revision'][2]} </td>". + "<td class=r>{$file['size'][0]} </td>". + "<td class=r>{$file['size'][1]} </td>". + "<td class=rb>{$file['size'][2]} </td>". + "<td class=r>{$file['date'][0]} </td>". + "<td class=r>{$file['date'][1]} </td>". + "<td class=rb>{$file['date'][2]} </td>". + "<td class=c>{$file['maintainer']}</td>". + "<td class=c>".trim($file['status'])."</td></tr>\n"; + $line_number++; + + } + + // echo the last dir and $lines + echo "$prev_diplay_dir ($line_number)</th></tr>"; + echo $lines; + + print("</table>\n<p> </p>\n$navbar<p> </p>\n"); + } -// echo the last dir and $lines -echo "$prev_diplay_dir ($line_number)</th></tr>"; -echo $lines; - -print("</table>\n<p> </p>\n$navbar<p> </p>\n"); - // ========================================================================= // Work in progress table goes here