Use the same template variable for commits, regardless of whether it comes in as hash or hashbase
Use the same template variable for commits, regardless of whether it comes in as hash or hashbase

--- a/include/controller/Controller_Blame.class.php
+++ b/include/controller/Controller_Blame.class.php
@@ -93,20 +93,20 @@
 		$head = $this->project->GetHeadCommit();
 		$this->tpl->assign('head', $head);
 
-		$hashbase = $this->project->GetCommit($this->params['hashbase']);
-		$this->tpl->assign('hashbase', $hashbase);
+		$commit = $this->project->GetCommit($this->params['hashbase']);
+		$this->tpl->assign('commit', $commit);
 
 		if ((!isset($this->params['hash'])) && (isset($this->params['file']))) {
-			$this->params['hash'] = $hashbase->PathToHash($this->params['file']);
+			$this->params['hash'] = $commit->PathToHash($this->params['file']);
 		}
 		
 		$hash = $this->project->GetBlob($this->params['hash']);
 		if ($this->params['file'])
 			$hash->SetName($this->params['file']);
-		$hash->SetCommit($hashbase);
+		$hash->SetCommit($commit);
 		$this->tpl->assign('hash', $hash);
 
-		$this->tpl->assign('tree', $hashbase->GetTree());
+		$this->tpl->assign('tree', $commit->GetTree());
 
 		$blame = $hash->GetBlame();
 		$this->tpl->assign('blame', $hash->GetBlame());

--- a/include/controller/Controller_Blob.class.php
+++ b/include/controller/Controller_Blob.class.php
@@ -133,17 +133,17 @@
 	 */
 	protected function LoadData()
 	{
-		$hashbase = $this->project->GetCommit($this->params['hashbase']);
-		$this->tpl->assign('hashbase', $hashbase);
+		$commit = $this->project->GetCommit($this->params['hashbase']);
+		$this->tpl->assign('commit', $commit);
 
 		if ((!isset($this->params['hash'])) && (isset($this->params['file']))) {
-			$this->params['hash'] = $hashbase->PathToHash($this->params['file']);
+			$this->params['hash'] = $commit->PathToHash($this->params['file']);
 		}
 
 		$hash = $this->project->GetBlob($this->params['hash']);
 		if ($this->params['file'])
 			$hash->SetName($this->params['file']);
-		$hash->SetCommit($hashbase);
+		$hash->SetCommit($commit);
 		$this->tpl->assign('hash', $hash);
 
 		if ($this->params['plain']) {
@@ -154,7 +154,7 @@
 		$head = $this->project->GetHeadCommit();
 		$this->tpl->assign('head', $head);
 
-		$this->tpl->assign('tree', $hashbase->GetTree());
+		$this->tpl->assign('tree', $commit->GetTree());
 
 		if (GitPHP_Config::GetInstance()->GetValue('filemimetype', true)) {
 			$mime = $hash->FileMime();

--- a/include/controller/Controller_Blobdiff.class.php
+++ b/include/controller/Controller_Blobdiff.class.php
@@ -116,17 +116,17 @@
 			return;
 		}
 
-		$hashbase = $this->project->GetCommit($this->params['hashbase']);
-		$this->tpl->assign('hashbase', $hashbase);
+		$commit = $this->project->GetCommit($this->params['hashbase']);
+		$this->tpl->assign('commit', $commit);
 
 		$hashparent = $this->project->GetBlob($this->params['hashparent']);
-		$hashparent->SetCommit($hashbase);
+		$hashparent->SetCommit($commit);
 		$this->tpl->assign('hashparent', $hashparent);
 
 		$hash = $this->project->GetBlob($this->params['hash']);
 		$this->tpl->assign('hash', $hash);
 
-		$tree = $hashbase->GetTree();
+		$tree = $commit->GetTree();
 		$this->tpl->assign('tree', $tree);
 	}
 

--- a/include/controller/Controller_Commitdiff.class.php
+++ b/include/controller/Controller_Commitdiff.class.php
@@ -104,7 +104,7 @@
 	protected function LoadData()
 	{
 		$co = $this->project->GetCommit($this->params['hash']);
-		$this->tpl->assign('hash', $co);
+		$this->tpl->assign('commit', $co);
 		$this->tpl->assign("hashparent",$this->params['hashparent']);
 
 		$treediff = new GitPHP_TreeDiff($this->project, $this->params['hash'], $this->params['hashparent']);

--- a/include/controller/Controller_History.class.php
+++ b/include/controller/Controller_History.class.php
@@ -89,7 +89,7 @@
 	protected function LoadData()
 	{
 		$co = $this->project->GetCommit($this->params['hash']);
-		$this->tpl->assign('hash', $co);
+		$this->tpl->assign('commit', $co);
 		$this->tpl->assign('tree', $co->GetTree());
 
 		$blobhash = $co->PathToHash($this->params['file']);

--- a/include/controller/Controller_Log.class.php
+++ b/include/controller/Controller_Log.class.php
@@ -92,7 +92,7 @@
 	 */
 	protected function LoadData()
 	{
-		$this->tpl->assign('hash', $this->project->GetCommit($this->params['hash']));
+		$this->tpl->assign('commit', $this->project->GetCommit($this->params['hash']));
 		$this->tpl->assign('head', $this->project->GetHeadCommit());
 		$this->tpl->assign('page',$this->params['page']);
 

--- a/include/controller/Controller_Search.class.php
+++ b/include/controller/Controller_Search.class.php
@@ -118,7 +118,7 @@
 	protected function LoadData()
 	{
 		$co = $this->project->GetCommit($this->params['hash']);
-		$this->tpl->assign('hash', $co);
+		$this->tpl->assign('commit', $co);
 
 		$results = array();
 		switch ($this->params['searchtype']) {
@@ -153,7 +153,6 @@
 		$this->tpl->assign('results', $results);
 
 		$this->tpl->assign('tree', $co->GetTree());
-		$this->tpl->assign('treehash', $co->GetTree());
 
 		$this->tpl->assign('page', $this->params['page']);
 

--- a/include/controller/Controller_Tag.class.php
+++ b/include/controller/Controller_Tag.class.php
@@ -85,8 +85,7 @@
 	protected function LoadData()
 	{
 		$head = $this->project->GetHeadCommit()->GetHash();
-		$this->tpl->assign("head",$head);
-		$this->tpl->assign("hash", $this->params['hash']);
+		$this->tpl->assign('head', $head);
 
 		$tag = new GitPHP_Tag($this->project, $this->params['hash']);
 

--- a/include/controller/Controller_Tree.class.php
+++ b/include/controller/Controller_Tree.class.php
@@ -96,21 +96,21 @@
 			throw new Exception('Hashbase is required');
 		}
 
-		$hashbase = $this->project->GetCommit($this->params['hashbase']);
+		$commit = $this->project->GetCommit($this->params['hashbase']);
 
-		$this->tpl->assign('hashbase', $hashbase);
+		$this->tpl->assign('commit', $commit);
 
 		if (!isset($this->params['hash'])) {
 			if (isset($this->params['file'])) {
-				$this->params['hash'] = $hashbase->PathToHash($this->params['file']);
+				$this->params['hash'] = $commit->PathToHash($this->params['file']);
 			} else {
-				$this->params['hash'] = $hashbase->GetTree()->GetHash();
+				$this->params['hash'] = $commit->GetTree()->GetHash();
 			}
 		}
 
 		$tree = $this->project->GetTree($this->params['hash']);
 		if (!$tree->GetCommit()) {
-			$tree->SetCommit($hashbase);
+			$tree->SetCommit($commit);
 		}
 		$this->tpl->assign('tree', $tree);
 

--- a/templates/blame.tpl
+++ b/templates/blame.tpl
@@ -9,9 +9,9 @@
  {include file='header.tpl'}
 
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$hashbase->GetHash()}">tree</a><br />
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a><br />
    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash->GetHash()}&f={$hash->GetPath()}">plain</a> | 
-   {if $hashbase->GetHash() != $head->GetHash()}
+   {if $commit->GetHash() != $head->GetHash()}
      <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blame&hb=HEAD&f={$hash->GetPath()}">HEAD</a>
    {else}
      HEAD
@@ -20,7 +20,7 @@
    <br />
  </div>
 
- {include file='title.tpl' titlecommit=$hashbase}
+ {include file='title.tpl' titlecommit=$commit}
 
  {include file='path.tpl' pathobject=$hash target='blob'}
  

--- a/templates/blob.tpl
+++ b/templates/blob.tpl
@@ -9,18 +9,18 @@
  {include file='header.tpl'}
 
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$hashbase->GetHash()}">tree</a><br />
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a><br />
    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash->GetHash()}&f={$file}">plain</a> | 
-   {if $hashbase->GetHash() != $head->GetHash()}
+   {if $commit->GetHash() != $head->GetHash()}
      <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&hb=HEAD&f={$file}">HEAD</a>
    {else}
      HEAD
    {/if}
-   {if !$datatag} | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blame&h={$hash->GetHash()}&f={$file}&hb={$hashbase->GetHash()}">blame</a>{/if}
+   {if !$datatag} | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blame&h={$hash->GetHash()}&f={$file}&hb={$commit->GetHash()}">blame</a>{/if}
    <br />
  </div>
 
- {include file='title.tpl' titlecommit=$hashbase}
+ {include file='title.tpl' titlecommit=$commit}
 
 {include file='path.tpl' pathobject=$hash target='blobplain'}
 

--- a/templates/blobdiff.tpl
+++ b/templates/blobdiff.tpl
@@ -10,19 +10,19 @@
 
  {* If we managed to look up commit info, we have enough info to display the full header - othewise just use a simple header *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$hashbase->GetHash()}">tree</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a>
    <br />
    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blobdiff_plain&h={$hash->GetHash()}&hp={$hashparent->GetHash()}&f={$file}">plain</a>
  </div>
 
- {include file='title.tpl' titlecommit=$hashbase}
+ {include file='title.tpl' titlecommit=$commit}
 
  {include file='path.tpl' pathobject=$hashparent target='blob'}
  
  <div class="page_body">
    <div class="diff_info">
      {* Display the from -> to diff header *}
-     blob:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$hashparent->GetHash()}&hb={$hashbase->GetHash()}&f={$file}">{if $file}a/{$file}{else}{$hashparent->GetHash()}{/if}</a> -&gt; blob:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$hash->GetHash()}&hb={$hashbase->GetHash()}&f={$file}">{if $file}b/{$file}{else}{$hash->GetHash()}{/if}</a>
+     blob:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$hashparent->GetHash()}&hb={$commit->GetHash()}&f={$file}">{if $file}a/{$file}{else}{$hashparent->GetHash()}{/if}</a> -&gt; blob:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$hash->GetHash()}&hb={$commit->GetHash()}&f={$file}">{if $file}b/{$file}{else}{$hash->GetHash()}{/if}</a>
    </div>
    {* Display the diff *}
    {include file='filediff.tpl' diff=$filediff->GetDiff($file, false, true)}

--- a/templates/commitdiff.tpl
+++ b/templates/commitdiff.tpl
@@ -10,14 +10,14 @@
 
  {* Nav *}
  <div class="page_nav">
-   {assign var=tree value=$hash->GetTree()}
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash->GetHash()}">commit</a> | commitdiff | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$hash->GetHash()}">tree</a><br /><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff_plain&h={$hash->GetHash()}{if $hashparent}&hp={$hashparent}{/if}">plain</a>
+   {assign var=tree value=$commit->GetTree()}
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$commit->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | commitdiff | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a><br /><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff_plain&h={$commit->GetHash()}{if $hashparent}&hp={$hashparent}{/if}">plain</a>
  </div>
 
- {include file='title.tpl' titlecommit=$hash}
+ {include file='title.tpl' titlecommit=$commit}
  
  <div class="page_body">
-   {foreach from=$hash->GetComment() item=line}
+   {foreach from=$commit->GetComment() item=line}
      {$line}<br />
    {/foreach}
    <br />
@@ -25,7 +25,7 @@
    {foreach from=$treediff item=filediff}
      <div class="diff_info">
      {if ($filediff->GetStatus() == 'D') || ($filediff->GetStatus() == 'M')}
-       {$filediff->GetFromFileType()}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$filediff->GetFromHash()}&hb={$hash->GetHash()}{if $filediff->GetFromFile()}&f={$filediff->GetFromFile()}{/if}">{if $filediff->GetFromFile()}{$filediff->GetFromFile()}{else}{$filediff->GetFromHash()}{/if}</a>
+       {$filediff->GetFromFileType()}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$filediff->GetFromHash()}&hb={$commit->GetHash()}{if $filediff->GetFromFile()}&f={$filediff->GetFromFile()}{/if}">{if $filediff->GetFromFile()}{$filediff->GetFromFile()}{else}{$filediff->GetFromHash()}{/if}</a>
        {if $filediff->GetStatus() == 'D'}
          (deleted)
        {/if}
@@ -36,7 +36,7 @@
      {/if}
 
      {if ($filediff->GetStatus() == 'A') || ($filediff->GetStatus() == 'M')}
-       {$filediff->GetToFileType()}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$filediff->GetToHash()}&hb={$hash->GetHash()}{if $filediff->GetToFile()}&f={$filediff->GetToFile()}{/if}">{if $filediff->GetToFile()}b/{$filediff->GetToFile()}{else}{$filediff->GetToHash()}{/if}</a>
+       {$filediff->GetToFileType()}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$filediff->GetToHash()}&hb={$commit->GetHash()}{if $filediff->GetToFile()}&f={$filediff->GetToFile()}{/if}">{if $filediff->GetToFile()}b/{$filediff->GetToFile()}{else}{$filediff->GetToHash()}{/if}</a>
 
        {if $filediff->GetStatus() == 'A'}
          (new)

--- a/templates/commitdiffplain.tpl
+++ b/templates/commitdiffplain.tpl
@@ -5,16 +5,16 @@
  *
  *  Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
  *}
-From: {$hash->GetAuthor()}
-Date: {$hash->GetAuthorEpoch()|date_format:"%a, %d %b %Y %H:%M:%S %z"}
-Subject: {$hash->GetTitle()}
-{assign var=tag value=$hash->GetContainingTag()}
+From: {$commit->GetAuthor()}
+Date: {$commit->GetAuthorEpoch()|date_format:"%a, %d %b %Y %H:%M:%S %z"}
+Subject: {$commit->GetTitle()}
+{assign var=tag value=$commit->GetContainingTag()}
 {if $tag}
 X-Git-Tag: {$tag->GetName()}
 {/if}
-X-Git-Url: {$self}?p={$project->GetProject()}&a=commitdiff&h={$hash->GetHash()}
+X-Git-Url: {$self}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}
 ---
-{foreach from=$hash->GetComment() item=line}
+{foreach from=$commit->GetComment() item=line}
 {$line}
 {/foreach}
 ---

--- a/templates/header.tpl
+++ b/templates/header.tpl
@@ -39,7 +39,7 @@
             <div class="search">
               <input type="hidden" name="p" value="{$project->GetProject()}" />
               <input type="hidden" name="a" value="search" />
-              <input type ="hidden" name="h" value="{if $hashbase instanceof GitPHP_Commit}{$hashbase->GetHash()}{elseif $hashbase}{$hashbase}{elseif $hash instanceof GitPHP_Commit}{$hash->GetHash()}{elseif $hash}{$hash}{else}HEAD{/if}" />
+              <input type ="hidden" name="h" value="{if $commit}{$commit->GetHash()}{elseif $hash instanceof GitPHP_Commit}{$hash->GetHash()}{elseif $hash}{$hash}{else}HEAD{/if}" />
               <select name="st">
                 <option {if $searchtype == 'commit'}selected="selected"{/if} value="commit">commit</option>
                 <option {if $searchtype == 'author'}selected="selected"{/if} value="author">author</option>

--- a/templates/heads.tpl
+++ b/templates/heads.tpl
@@ -19,11 +19,11 @@
  <table cellspacing="0">
    {* Loop and display each head *}
    {foreach from=$headlist item=head}
-     {assign var=commit value=$head->GetCommit()}
+     {assign var=headcommit value=$head->GetCommit()}
      <tr class="{cycle values="light,dark"}">
-       <td><em>{$commit->GetAge()|agestring}</em></td>
+       <td><em>{$headcommit->GetAge()|agestring}</em></td>
        <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$head->GetName()}" class="list"><strong>{$head->GetName()}</strong></a></td>
-       <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$head->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h=refs/heads/{$head->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h=refs/heads/{$head->GetName()}&hb={$commit->GetHash()}">tree</a></td>
+       <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$head->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h=refs/heads/{$head->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h=refs/heads/{$head->GetName()}&hb={$headcommit->GetHash()}">tree</a></td>
      </tr>
    {/foreach}
  </table>

--- a/templates/history.tpl
+++ b/templates/history.tpl
@@ -10,11 +10,11 @@
 
  {* Page header *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$hash->GetHash()}">tree</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a>
    <br /><br />
  </div>
 
- {include file='title.tpl' titlecommit=$hash}
+ {include file='title.tpl' titlecommit=$commit}
 
  {include file='path.tpl' pathobject=$blob target='blob'}
  

--- a/templates/log.tpl
+++ b/templates/log.tpl
@@ -10,22 +10,22 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash->GetHash()}">shortlog</a> | log | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$hash->GetHash()}&hb={$hash->GetHash()}">tree</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}">shortlog</a> | log | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$commit->GetHash()}&hb={$commit->GetHash()}">tree</a>
    <br />
-   {if ($hash->GetHash() != $head->GetHash()) || ($page > 0)}
+   {if ($commit->GetHash() != $head->GetHash()) || ($page > 0)}
      <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">HEAD</a>
    {else}
      HEAD
    {/if}
    &sdot; 
    {if $page > 0}
-     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash->GetHash()}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$commit->GetHash()}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
    {else}
      prev
    {/if}
    &sdot; 
    {if $hasmore}
-     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash->GetHash()}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$commit->GetHash()}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
    {else}
      next
    {/if}
@@ -67,7 +67,7 @@
      <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary" class="title">&nbsp</a>
    </div>
    <div class="page_body">
-     Last change {$hash->GetAge()|agestring}.
+     Last change {$commit->GetAge()|agestring}.
      <br /><br />
    </div>
  {/foreach}

--- a/templates/project.tpl
+++ b/templates/project.tpl
@@ -104,10 +104,10 @@
          {if $smarty.section.head.index == 16}
            <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=heads">...</a></td>
          {else}
-	   {assign var=commit value=$headlist[head]->GetCommit()}
-           <td><em>{$commit->GetAge()|agestring}</em></td>
+	   {assign var=headcommit value=$headlist[head]->GetCommit()}
+           <td><em>{$headcommit->GetAge()|agestring}</em></td>
            <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$headlist[head]->GetName()}" class="list"><strong>{$headlist[head]->GetName()}</strong></td>
-           <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$headlist[head]->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h=refs/heads/{$headlist[head]->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h=refs/heads/{$headlist[head]->GetName()}&hb={$commit->GetHash()}">tree</a></td>
+           <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$headlist[head]->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h=refs/heads/{$headlist[head]->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h=refs/heads/{$headlist[head]->GetName()}&hb={$headcommit->GetHash()}">tree</a></td>
          {/if}
        </tr>
      {/section}

--- a/templates/search.tpl
+++ b/templates/search.tpl
@@ -10,29 +10,29 @@
 
 {* Nav *}
 <div class="page_nav">
-  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$hash->GetHash()}">tree</a>
+  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$commit->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a>
   <br />
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}">first</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}">first</a>
   {else}
     first
   {/if}
     &sdot; 
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}{if $page > 1}&pg={$page-1}{/if}" accesskey="p" title="Alt-p">prev</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}{if $page > 1}&pg={$page-1}{/if}" accesskey="p" title="Alt-p">prev</a>
   {else}
     prev
   {/if}
     &sdot; 
   {if $hasmore}
-    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
   {else}
     next
   {/if}
   <br />
 </div>
 
-{include file='title.tpl' titlecommit=$hash}
+{include file='title.tpl' titlecommit=$commit}
 
 <table cellspacing="0">
   {* Print each match *}
@@ -65,7 +65,7 @@
 
   {if $hasmore}
     <tr>
-      <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" title="Alt-n">next</a></td>
+      <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" title="Alt-n">next</a></td>
     </tr>
   {/if}
 </table>

--- a/templates/searchfiles.tpl
+++ b/templates/searchfiles.tpl
@@ -10,29 +10,29 @@
 
 {* Nav *}
 <div class="page_nav">
-  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$hash->GetHash()}">tree</a>
+  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$commit->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree->GetHash()}&hb={$commit->GetHash()}">tree</a>
   <br />
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}">first</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}">first</a>
   {else}
     first
   {/if}
     &sdot; 
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}{if $page > 1}&pg={$page-1}{/if}" accesskey="p" title="Alt-p">prev</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}{if $page > 1}&pg={$page-1}{/if}" accesskey="p" title="Alt-p">prev</a>
   {else}
     prev
   {/if}
     &sdot; 
   {if $hasmore}
-    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
   {else}
     next
   {/if}
   <br />
 </div>
 <div class="title">
-  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash->GetHash()}" class="title">{$hash->GetTitle()}</a>
+  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}" class="title">{$commit->GetTitle()}</a>
 </div>
 <table cellspacing="0">
   {* Print each match *}
@@ -41,20 +41,20 @@
       {assign var=resultobject value=$result.object}
       {if $resultobject instanceof GitPHP_Tree}
 	      <td>
-		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$resultobject->GetHash()}&hb={$hash->GetHash()}&f={$path}" class="list"><strong>{$path}</strong></a>
+		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$resultobject->GetHash()}&hb={$commit->GetHash()}&f={$path}" class="list"><strong>{$path}</strong></a>
 	      </td>
 	      <td class="link">
-		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$resultobject->GetHash()}&hb={$hash->GetHash()}&f={$path}">tree</a>
+		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$resultobject->GetHash()}&hb={$commit->GetHash()}&f={$path}">tree</a>
 	      </td>
       {else}
 	      <td>
-		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$result.object->GetHash()}&hb={$hash->GetHash()}&f={$path}" class="list"><strong>{$path}</strong></a>
+		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$result.object->GetHash()}&hb={$commit->GetHash()}&f={$path}" class="list"><strong>{$path}</strong></a>
 		  {foreach from=$result.lines item=line name=match}
 		    {if $smarty.foreach.match.first}<br />{/if}<span class="respectwhitespace">{$line|escape}</span><br />
 		  {/foreach}
 	      </td>
 	      <td class="link">
-		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$resultobject->GetHash()}&hb={$hash->GetHash()}&f={$path}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$hash->GetHash()}&f={$path}">history</a>
+		  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$resultobject->GetHash()}&hb={$commit->GetHash()}&f={$path}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$commit->GetHash()}&f={$path}">history</a>
 	      </td>
       {/if}
     </tr>
@@ -62,7 +62,7 @@
 
   {if $hasmore}
     <tr>
-      <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" title="Alt-n">next</a></td>
+      <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$commit->GetHash()}&s={$search}&st={$searchtype}&pg={$page+1}" title="Alt-n">next</a></td>
     </tr>
   {/if}
 </table>

--- a/templates/shortlog.tpl
+++ b/templates/shortlog.tpl
@@ -10,22 +10,22 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | shortlog | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$hash->GetHash()}&hb={$hash->GetHash()}">tree</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | shortlog | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$commit->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$commit->GetHash()}&hb={$commit->GetHash()}">tree</a>
    <br />
-   {if ($hash->GetHash() != $head->GetHash()) || ($page > 0)}
+   {if ($commit->GetHash() != $head->GetHash()) || ($page > 0)}
      <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">HEAD</a>
    {else}
      HEAD
    {/if}
      &sdot; 
    {if $page > 0}
-     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash->GetHash()}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
    {else}
      prev
    {/if}
      &sdot; 
    {if $hasmore}
-     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash->GetHash()}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
    {else}
      next
    {/if}
@@ -61,7 +61,7 @@
 
    {if $hasmore}
      <tr>
-       <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash->GetHash()}&pg={$page+1}" title="Alt-n">next</a></td>
+       <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}&pg={$page+1}" title="Alt-n">next</a></td>
      </tr>
    {/if}
  </table>

--- a/templates/tag.tpl
+++ b/templates/tag.tpl
@@ -14,14 +14,14 @@
    <br /><br />
  </div>
  {* Tag data *}
+ {assign var=object value=$tag->GetObject()}
  <div class="title">
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}" class="title">{$tag->GetName()}</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$object->GetHash()}" class="title">{$tag->GetName()}</a>
  </div>
  <div class="title_text">
    <table cellspacing="0">
      <tr>
        <td>object</td>
-       {assign var=object value=$tag->GetObject()}
        <td class="monospace"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a={$tag->GetType()}&h={$object->GetHash()}" class="list">{$object->GetHash()}</a></td>
        <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a={$tag->GetType()}&h={$object->GetHash()}">{$tag->GetType()}</a></td>
      </tr>

--- a/templates/title.tpl
+++ b/templates/title.tpl
@@ -14,7 +14,7 @@
 		{if $target == 'commitdiff'}
 			<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$titlecommit->GetHash()}" class="title">{$titlecommit->GetTitle()}</a>
 		{elseif $target == 'tree'}
-			<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$titletree->GetHash()}&hb={$titlecommit->GetHash()}" class="title">{$commit->GetTitle()}</a>
+			<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$titletree->GetHash()}&hb={$titlecommit->GetHash()}" class="title">{$titlecommit->GetTitle()}</a>
 		{else}
 			<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$titlecommit->GetHash()}" class="title">{$titlecommit->GetTitle()}</a>
 		{/if}

--- a/templates/tree.tpl
+++ b/templates/tree.tpl
@@ -10,10 +10,10 @@
 
  {* Nav *}
    <div class="page_nav">
-     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hashbase->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hashbase->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase->GetHash()}">commitdiff</a> | tree<br /><br />
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$commit->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$commit->GetHash()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commit->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | tree<br /><br />
    </div>
 
- {include file='title.tpl' titlecommit=$hashbase}
+ {include file='title.tpl' titlecommit=$commit}
 
  {include file='path.tpl' pathobject=$tree target='tree'}
  
@@ -26,18 +26,18 @@
          {if $treeitem instanceof GitPHP_Blob}
 	   <td>{$treeitem->GetSize()}</td>
            <td class="list">
-             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$treeitem->GetHash()}&hb={$hashbase->GetHash()}&f={$treeitem->GetPath()}" class="list">{$treeitem->GetName()}</a>
+             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$treeitem->GetHash()}&hb={$commit->GetHash()}&f={$treeitem->GetPath()}" class="list">{$treeitem->GetName()}</a>
 	   </td>
            <td class="link">
-	     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$treeitem->GetHash()}&hb={$hashbase->GetHash()}&f={$treeitem->GetPath()}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$hashbase->GetHash()}&f={$treeitem->GetPath()}">history</a>
+	     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$treeitem->GetHash()}&hb={$commit->GetHash()}&f={$treeitem->GetPath()}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$commit->GetHash()}&f={$treeitem->GetPath()}">history</a>
 	   </td>
          {elseif $treeitem instanceof GitPHP_Tree}
 	   <td></td>
            <td class="list">
-             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treeitem->GetHash()}&hb={$hashbase->GetHash()}&f={$treeitem->GetPath()}">{$treeitem->GetName()}</a>
+             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treeitem->GetHash()}&hb={$commit->GetHash()}&f={$treeitem->GetPath()}">{$treeitem->GetName()}</a>
 	   </td>
            <td class="link">
-	     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treeitem->GetHash()}&hb={$hashbase->GetHash()}&f={$treeitem->GetPath()}">tree</a>
+	     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treeitem->GetHash()}&hb={$commit->GetHash()}&f={$treeitem->GetPath()}">tree</a>
 	   </td>
          {/if}
        </tr>

comments