Adding language settings to config.php so that people can control the language output...
[viewsvn.git] / browse.php
index f6f075863131781a8850f36444e9dbd65c53553b..00ccbebbd8405802f429d11ee2c067c70f0e007b 100644 (file)
@@ -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
@@ -33,7 +33,22 @@ $navbar = ConstructNavbar();
 
 // ###################################################################
 
-$revision = new Revision($input->in['repos'], $input->in['rev'], $input->in['path']);
+$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('browse', $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);
+}
 
 // ###################################################################
 
@@ -45,7 +60,7 @@ $proplist = FormatPropList($props);
 
 $revision->getRevisionInfo();
 
-$listing = BSXml::Parse($lib->run('ls --xml -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']), true));
+$listing = BSXml::Parse($lib->run('ls --xml -r' . $revision->revision . ' ' . $lib->arg($repos->fetchPath($input->in['repos']) . $input->in['path']) . '@' . $revision->revision, true));
 
 BSXml::UnifyNode($listing['lists']['list']['entry']);
 $nodes = '';
@@ -59,6 +74,8 @@ foreach ($listing['lists']['list']['entry'] AS $item)
 
 // ###################################################################
 
+$link['log'] = ConstructLink('log', $input->in['repos'], $input->in['path'], $input->in['rev']);
+
 eval('$template->flush("' . $template->fetch('browse') . '");');
 
 /*=====================================================================*\