Update of /cvsroot/phpcvsview/phpcvsview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1710
Modified Files:
func_FileView.php
Log Message:
Moved the quicklink bar generation to the theme.php.
Removed highlighting for php files as it doesn't support themes. will code our own syntax highlighter later in the project.
Index: func_FileView.php
===================================================================
RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileView.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** func_FileView.php 3 Oct 2004 14:03:04 -0000 1.3
--- func_FileView.php 4 Oct 2004 11:46:37 -0000 1.4
***************
*** 46,84 ****
}
! // Start the output for the file.
! $Dirs = explode("/", $ModPath);
! echo "<div class=\"quicknav\">Navigate to: <a href=\"$ScriptName\">Root</a> ";
! $intCount = 1;
! while($intCount < count($Dirs)){
! echo "/ <a href=\"$ScriptName?mp=".ImplodeToPath($Dirs, "/", $intCount);
! if ($intCount == (count($Dirs) - 1)) {
! echo "&fh#rd$Revision";
! }
! else
! {
! echo "/";
! }
! echo "\">".$Dirs[$intCount]."</a> ";
! $intCount++;
! } // while
! echo "</div>\n";
!
// Display the file contents.
echo "<hr />\n";
! if (strpos($File, ".php")) {
! $search = array('\t');
! $replace = array(" ");
! $Content = str_replace($search, $replace, $CVSServer->FILECONTENTS);
! echo highlight_string($Content, true);
! }
! else
! {
! $search = array('<', '>', '\n', '\t');
! $replace = array("<", ">", "", " ");
! echo "<pre>\n";
! echo str_replace($search, $replace, $CVSServer->FILECONTENTS)."\n";
! echo "</pre>\n";
! }
// Close the connection.
--- 46,59 ----
}
! // Add the quick link navigation bar.
! echo GetQuickLinkBar($ModPath, "Code view for: ", true, true, $Revision);
// Display the file contents.
echo "<hr />\n";
! $search = array('<', '>', '\n', '\t');
! $replace = array("<", ">", "", " ");
! echo "<pre>\n";
! echo str_replace($search, $replace, $CVSServer->FILECONTENTS)."\n";
! echo "</pre>\n";
// Close the connection.
|