Update of /cvsroot/phpcvsview/phpcvsview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10956
Modified Files:
func_FileView.php
Log Message:
- added/edited html output for xhtml compatibility
- fixed undefined variable notice
Index: func_FileView.php
===================================================================
RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileView.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** func_FileView.php 18 Feb 2005 23:30:29 -0000 1.18
--- func_FileView.php 15 Apr 2005 05:36:04 -0000 1.19
***************
*** 30,38 ****
// Add the quick link navigation bar.
! echo GetQuickLinkBar($lang['code_view'], true, true, $Revision)."<hr />\n";
!
// Check and see if this file and version has already been viewed and exists in the cache.
if ($config['Cache']['Enable']) {
- $CachedFileName = $config['Cache']['Location'];
if (!file_exists($CachedFileName)) {
mkdir($CachedFileName, 0750);
--- 30,41 ----
// Add the quick link navigation bar.
! echo GetQuickLinkBar($lang['code_view'], true, true, $Revision)."\n";
! echo '<hr />'."\n";
!
! echo '<div id="fileview">'."\n";
!
// Check and see if this file and version has already been viewed and exists in the cache.
+ $CachedFileName = $config['Cache']['Location'];
if ($config['Cache']['Enable']) {
if (!file_exists($CachedFileName)) {
mkdir($CachedFileName, 0750);
***************
*** 40,47 ****
$CachedFileName .= "/".str_replace("/", "_", $File).",$Revision";
}
if (file_exists($CachedFileName) && $config['Cache']['Enable']) {
$fd = fopen($CachedFileName, "r");
if ($fd !== false) {
! fpassthru($fd);
fclose($fd);
}
--- 43,51 ----
$CachedFileName .= "/".str_replace("/", "_", $File).",$Revision";
}
+
if (file_exists($CachedFileName) && $config['Cache']['Enable']) {
$fd = fopen($CachedFileName, "r");
if ($fd !== false) {
! fpassthru($fd);
fclose($fd);
}
***************
*** 86,90 ****
$fd = fopen($CachedFileName, "w");
if ($fd !== false) {
! fwrite($fd, '<table class="source"><tr><td>'.$hlcontent.'</td></tr></table>');
fclose($fd);
}
--- 90,94 ----
$fd = fopen($CachedFileName, "w");
if ($fd !== false) {
! fwrite($fd, '<p class="source">'.$hlcontent.'</p>');
fclose($fd);
}
***************
*** 92,98 ****
// Display the file contents.
! echo '<table class="source"><tr><td>';
echo $hlcontent;
! echo '</td></tr></table>';
}
else
--- 96,102 ----
// Display the file contents.
! echo '<p class="source">';
echo $hlcontent;
! echo '</p>';
}
else
***************
*** 114,117 ****
--- 118,122 ----
$fd = false;
}
+
echo "<pre>\n";
for($i = 1; $i <= $soure_size; $i++) {
***************
*** 122,125 ****
--- 127,131 ----
echo $line;
}
+
if ($fd !== false) {
fwrite($fd, "</pre>\n");
***************
*** 133,137 ****
}
}
! echo "<hr />";
echo GetPageFooter();
}
--- 139,144 ----
}
}
! echo '</div>';
! echo '<hr />'."\n";
echo GetPageFooter();
}
|