/*=====================================================================*\
|| ###################################################################
|| # ViewSVN [#]version[#]
-|| # Copyright ©2002-[#]year[#] Iris Studios, Inc.
+|| # Copyright ©2002-[#]year[#] Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
\*=====================================================================*/
$fetchtemplates = array(
- 'view'
+ 'view',
+ 'property'
);
+define('SVN', '$Id$');
+
require_once('./global.php');
-$navbar = $viewsvn->paths->construct_breadcrumb($viewsvn->paths->path);
+$navbar = ConstructNavbar();
// ###################################################################
-$latest = $cachev->fetch_node($viewsvn->paths->relpath);
-
-$link['log'] = $viewsvn->paths->out('log.php' . $viewsvn->paths->revstr, $viewsvn->paths->path);
-
-$show['head'] = ($latest['revision'] != $viewsvn->paths->revnum AND $viewsvn->paths->revnum != 'HEAD');
-if ($show['head'])
+$revision = $headRev = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']);
+if ($input->in['rev'])
{
- $link['gohead'] = $viewsvn->paths->out('browse.php' . $viewsvn->paths->fetch_rev_str(false, 'HEAD'), $viewsvn->paths->path);
- $link['diffhead'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, 'HEAD', $viewsvn->paths->revnum), $viewsvn->paths->path);
+ $headRev = new Revision($input->in['repos'], 0, $input->in['path']);
+ if ($headRev->revision != $revision->revision)
+ {
+ $show['head'] = true;
+ $link['gohead'] = ConstructLink('view', $input->in['repos'], $input->in['path'], 0);
+ }
}
-$show['prev'] = ($prev = $cachev->fetch_prev_revision($viewsvn->paths->relpath, $viewsvn->paths->revnum));
-if ($show['prev'])
+if ($revision->revision - 1 > 0)
{
- $link['diffprev'] = $viewsvn->paths->out('diff.php' . $viewsvn->paths->fetch_rev_str(true, $viewsvn->paths->revnum, $prev), $viewsvn->paths->path);
+ $show['diff'] = true;
+ $link['diff'] = ConstructLink('diff', $input->in['repos'], $input->in['path'], $revision->revision);
}
+$link['log'] = ConstructLink('log', $input->in['repos'], $input->in['path'], 0);
+
// ###################################################################
-$logmsg = $cachev->fetch_revision($latest['revision']);
-unset($logmsg['files']);
+$revision->getRevisionInfo();
-$logmsg['message_clean'] = $viewsvn->svn->format_log_message($logmsg['message']);
-$logmsg['date'] = $viewsvn->svn->format_date_string($logmsg['dateline']);
+$catdata = $lib->run('cat -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']), true);
-$catdata = implode("\n", $viewsvn->svn->cat($viewsvn->paths->repos, $viewsvn->paths->relpath, $viewsvn->paths->revnum));
+// ###################################################################
+
+$props = $revision->getPropsForPath($input->in['path']);
+$show['props'] = (sizeof($props) > 0);
+$proplist = FormatPropList($props);
+
+// ###################################################################
// get language information
require_once('./includes/file_types.php');
-$extension = $funct->fetch_extension($viewsvn->paths->relpath);
+$extension = BSFunctions::FetchExtension($input->in['path']);
$language = (isset($filetypes["$extension"]) ? $filetypes["$extension"] : null);
// initialize GeSHi
// 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));
// ###################################################################