Adding language settings to config.php so that people can control the language output...
[viewsvn.git] / view.php
index e45180f2563d0bdda22a3b7329cbb2b8d637ed95..b2aa13bebb64c89a75deab12832f804b1f674d0e 100644 (file)
--- a/view.php
+++ b/view.php
@@ -2,7 +2,7 @@
 /*=====================================================================*\
 || ###################################################################
 || # 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
@@ -32,15 +32,28 @@ $navbar = ConstructNavbar();
 
 // ###################################################################
 
-$revision = new Revision($input->in['repos'], $input->in['rev']);
+$revision = $headRev = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']);
+if ($input->in['rev'])
+{
+       $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);
+       }
+}
 
-// ###################################################################
+if ($revision->revision - 1 > 0)
+{
+       $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 = $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']);*/
+$revision->getRevisionInfo();
 
 $catdata = $lib->run('cat -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']), true);