From 56d1ac86cf62af1850117c16c4c9e0066514f540 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 9 Apr 2007 04:29:03 +0000 Subject: [PATCH] Updating view.php to work --- templates/default/view.tpl | 2 +- view.php | 31 +++++++++---------------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/templates/default/view.tpl b/templates/default/view.tpl index 9d4587e..e4f2401 100644 --- a/templates/default/view.tpl +++ b/templates/default/view.tpl @@ -2,7 +2,7 @@ $doctype $headinclude - + {@"View"} diff --git a/view.php b/view.php index b4e64af..a8f5be5 100644 --- a/view.php +++ b/view.php @@ -24,38 +24,25 @@ $fetchtemplates = array( 'property' ); +define('SVN', '$Id$'); + require_once('./global.php'); -$navbar = $controller->construct_breadcrumb(); +$navbar = ConstructNavbar(); // ################################################################### -$latest = $controller->cachev->fetch_node(); - -$link['log'] = $controller->href_compound('log.php'); - -$show['head'] = ($latest['revision'] != $controller->revctx); -if ($show['head']) -{ - $link['gohead'] = $controller->href_compound('view.php', null, Paths::fetch_rev_str(false, 'HEAD')); - $link['diffhead'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, 'HEAD', $controller->revctx)); -} - -$show['prev'] = ($prev = $controller->cachev->fetch_prev_revision($controller->revctx)); -if ($show['prev']) -{ - $link['diffprev'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, $controller->revctx, $prev['revision'])); -} +$revision = new Revision($input->in['repos'], $input->in['rev']); // ################################################################### -$logmsg = $controller->cachev->fetch_revision($controller->revctx); +/*$logmsg = $controller->cachev->fetch_revision($controller->revctx); unset($logmsg['files']); $logmsg['message_clean'] = SVNCommon::format_log_message($logmsg['message']); -$logmsg['date'] = SVNCommon::format_date_string($logmsg['dateline']); +$logmsg['date'] = SVNCommon::format_date_string($logmsg['dateline']);*/ -$catdata = implode("\n", $controller->library->command('cat')); +$catdata = $lib->run('cat -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']), true); // ################################################################### @@ -75,7 +62,7 @@ if (sizeof($latest['properties']) > 0) // get language information require_once('./includes/file_types.php'); -$extension = $funct->fetch_extension($controller->path); +$extension = BSFunctions::FetchExtension($input->in['path']); $language = (isset($filetypes["$extension"]) ? $filetypes["$extension"] : null); // initialize GeSHi @@ -108,7 +95,7 @@ $geshi->set_tab_width(5); // parse the code $catdata = $geshi->parse_code(); -$viewsvn->debug("time in GeSHi = " . $funct->fetch_microtime_diff($mtstart)); +BSRegister::Debug("time in GeSHi = " . BSFunctions::FetchMicrotimeDiff($mtstart)); // ################################################################### -- 2.43.5