Export the project object itself to the template
Export the project object itself to the template

--- a/include/controller/ControllerBase.class.php
+++ b/include/controller/ControllerBase.class.php
@@ -218,11 +218,8 @@
 		$this->tpl->assign('stylesheet', GitPHP_Config::GetInstance()->GetValue('stylesheet', 'gitphp.css'));
 		$this->tpl->assign('pagetitle', GitPHP_Config::GetInstance()->GetValue('title', $gitphp_appstring));
 		$this->tpl->assign("self",script_url());
-		if ($this->project) {
-			$this->tpl->assign('validproject', true);
-			$this->tpl->assign('project', $this->project->GetProject());
-			$this->tpl->assign('projectdescription', $this->project->GetDescription());
-		}
+		if ($this->project)
+			$this->tpl->assign('project', $this->project);
 		if (GitPHP_Config::GetInstance()->GetValue('search', true))
 			$this->tpl->assign('enablesearch', true);
 		if (GitPHP_Config::GetInstance()->GetValue('filesearch', true))

--- a/templates/blame.tpl
+++ b/templates/blame.tpl
@@ -11,18 +11,18 @@
  {* 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">
    {if $fullnav}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hashbase}">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={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$hashbase}">tree</a><br />
      {if $file}
-       <a href="{$SCRIPT_NAME}?p={$project}&a=blob_plain&h={$hash}&f={$file}">plain</a> | 
+       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}&f={$file}">plain</a> | 
        {if ($hashbase != "HEAD") && ($hashbase != $head)}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=blame&hb=HEAD&f={$file}">HEAD</a>
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blame&hb=HEAD&f={$file}">HEAD</a>
        {else}
          HEAD
        {/if}
         | blame
        <br />
      {else}
-       <a href="{$SCRIPT_NAME}?p={$project}&a=blob_plain&h={$hash}">plain</a><br />
+       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}">plain</a><br />
      {/if}
    {else}
      <br /><br />
@@ -30,7 +30,7 @@
  </div>
  <div>
    {if $fullnav}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}" class="title">{$title}
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}" class="title">{$title}
      {if $hashbaseref}
        <span class="tag">{$hashbaseref}</span>
      {/if}
@@ -42,12 +42,12 @@
  <div class="page_path">
    {* The path to the file, with directories broken into tree links *}
    <b>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project}]</a> / 
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project->GetProject()}]</a> / 
      {foreach from=$paths item=path name=paths}
        {if $smarty.foreach.paths.last}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=blob_plain&h={$path.tree}&f={$path.full}">{$path.short}</a>
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$path.tree}&f={$path.full}">{$path.short}</a>
        {else}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
        {/if}
      {/foreach}
    </b>
@@ -64,7 +64,7 @@
 			<td class="date">
 			{if $smarty.foreach.linegroup.first}
 			{if $blameitem.commit}
-			<a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$blameitem.commit}" title="{$blameitem.commitdata.summary}">{$blameitem.commitdata.authortime|date_format:"%F %X"}</a>
+			<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$blameitem.commit}" title="{$blameitem.commitdata.summary}">{$blameitem.commitdata.authortime|date_format:"%F %X"}</a>
 			{else}
 			{$blameitem.commitdata.authortime|date_format:"%F %X"}
 			{/if}

--- a/templates/blob.tpl
+++ b/templates/blob.tpl
@@ -11,18 +11,18 @@
  {* 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">
    {if $fullnav}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hashbase}">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={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$hashbase}">tree</a><br />
      {if $file}
-       <a href="{$SCRIPT_NAME}?p={$project}&a=blob_plain&h={$hash}&f={$file}">plain</a> | 
+       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}&f={$file}">plain</a> | 
        {if ($hashbase != "HEAD") && ($hashbase != $head)}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=blob&hb=HEAD&f={$file}">HEAD</a>
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&hb=HEAD&f={$file}">HEAD</a>
        {else}
          HEAD
        {/if}
-       {if !$mime && !$data} | <a href="{$SCRIPT_NAME}?p={$project}&a=blame&h={$hash}&f={$file}&hb={$hashbase}">blame</a>{/if}
+       {if !$mime && !$data} | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blame&h={$hash}&f={$file}&hb={$hashbase}">blame</a>{/if}
        <br />
      {else}
-       <a href="{$SCRIPT_NAME}?p={$project}&a=blob_plain&h={$hash}">plain</a><br />
+       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$hash}">plain</a><br />
      {/if}
    {else}
      <br /><br />
@@ -30,7 +30,7 @@
  </div>
  <div>
    {if $fullnav}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}" class="title">{$title}
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}" class="title">{$title}
      {if $hashbaseref}
        <span class="tag">{$hashbaseref}</span>
      {/if}
@@ -42,12 +42,12 @@
  <div class="page_path">
    {* The path to the file, with directories broken into tree links *}
    <b>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project}]</a> / 
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project->GetProject()}]</a> / 
      {foreach from=$paths item=path name=paths}
        {if $smarty.foreach.paths.last}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=blob_plain&h={$path.tree}&f={$path.full}">{$path.short}</a>
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$path.tree}&f={$path.full}">{$path.short}</a>
        {else}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
        {/if}
      {/foreach}
    </b>

--- a/templates/blobdiff.tpl
+++ b/templates/blobdiff.tpl
@@ -11,16 +11,16 @@
  {* 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">
    {if $fullnav}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hashbase}">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={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$hashbase}">tree</a>
      <br />
-     <a href="{$SCRIPT_NAME}?p={$project}&a=blobdiff_plain&h={$hash}&hp={$hashparent}&f={$file}">plain</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blobdiff_plain&h={$hash}&hp={$hashparent}&f={$file}">plain</a>
    {else}
      <br /><br />
    {/if}
  </div>
  <div class="title">
    {if $fullnav}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}" class="title">{$title}
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}" class="title">{$title}
        {if $hashbaseref}
          <span class="tag">{$hashbaseref}</span>
        {/if}
@@ -32,12 +32,12 @@
  <div class="page_path">
    {* The path to the file, with directories broken into tree links *}
    <b>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project}]</a> / 
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project->GetProject()}]</a> / 
      {foreach from=$paths item=path name=paths}
        {if $smarty.foreach.paths.last}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$path.tree}&hb={$hashbase}&f={$path.full}">{$path.short}</a>
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$path.tree}&hb={$hashbase}&f={$path.full}">{$path.short}</a>
        {else}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
        {/if}
      {/foreach}
    </b>
@@ -45,7 +45,7 @@
  <div class="page_body">
    <div class="diff_info">
      {* Display the from -> to diff header *}
-     blob:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$hashparent}&hb={$hashbase}&f={$file}">{if $file}a/{$file}{else}{$hashparent}{/if}</a> -&gt; blob:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$hash}&hb={$hashbase}&f={$file}">{if $file}b/{$file}{else}{$hash}{/if}</a>
+     blob:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$hashparent}&hb={$hashbase}&f={$file}">{if $file}a/{$file}{else}{$hashparent}{/if}</a> -&gt; blob:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$hash}&hb={$hashbase}&f={$file}">{if $file}b/{$file}{else}{$hash}{/if}</a>
    </div>
    {* Display the diff *}
    {include file='filediff.tpl'}

--- a/templates/commit.tpl
+++ b/templates/commit.tpl
@@ -10,19 +10,19 @@
 
  <div class="page_nav">
    {* Nav *}
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$commit->GetHash()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$commit->GetHash()}">log</a> | commit | {if $parent}<a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | {/if}<a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$commit->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> | commit | {if $parent}<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}">commitdiff</a> | {/if}<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$commit->GetHash()}">tree</a>
    <br /><br />
  </div>
  <div class="title">
    {* Commit header *}
    {if $parent}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commit->GetHash()}" class="title">{$commit->GetTitle()}</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}" class="title">{$commit->GetTitle()}</a>
      <span class="refs">
      {assign var=heads value=$commit->GetHeads()}
      {if count($heads) > 0}
        {foreach name=head item=head from=$heads}
          <span class="head">
-	   <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$head->GetName()}">{$head->GetName()}</a>
+	   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$head->GetName()}">{$head->GetName()}</a>
 	 </span>
        {/foreach}
      {/if}
@@ -30,13 +30,13 @@
      {if count($tags) > 0}
        {foreach name=tag item=tag from=$tags}
          <span class="tag">
-           <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$tag->GetName()}">{$tag->GetName()}</a>
+           <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tag&h={$tag->GetName()}">{$tag->GetName()}</a>
          </span>
        {/foreach}
      {/if}
      </span>
    {else}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$commit->GetHash()}" class="title">{$commit->GetTitle()}</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$commit->GetHash()}" class="title">{$commit->GetTitle()}</a>
    {/if}
  </div>
  <div class="title_text">
@@ -70,14 +70,14 @@
      <tr>
      <tr>
        <td>tree</td>
-       <td class="monospace"><a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$commit->GetHash()}" class="list">{$tree}</a></td>
-       <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$commit->GetHash()}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$commit->GetHash()}">snapshot</a></td>
+       <td class="monospace"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$commit->GetHash()}" class="list">{$tree}</a></td>
+       <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$commit->GetHash()}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=snapshot&h={$commit->GetHash()}">snapshot</a></td>
      </tr>
      {foreach from=$commit->GetParents() item=par}
        <tr>
          <td>parent</td>
-	 <td class="monospace"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$par->GetHash()}" class="list">{$par->GetHash()}</a></td>
-         <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$par->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commit->GetHash()}&hp={$par->GetHash()}">commitdiff</a></td>
+	 <td class="monospace"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$par->GetHash()}" class="list">{$par->GetHash()}</a></td>
+         <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$par->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commit->GetHash()}&hp={$par->GetHash()}">commitdiff</a></td>
        </tr>
      {/foreach}
    </table>
@@ -98,28 +98,28 @@
      <tr class="{cycle values="light,dark"}">
 	 
        {if $difftreelines[difftree].status == "A"}
-         <td><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a></td>
+         <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a></td>
          <td><span class="newfile">[new {$difftreelines[difftree].to_filetype}{if $difftreelines[difftree].isreg} with mode: {$difftreelines[difftree].to_mode_cut}{/if}]</span></td>
-         <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">blob</a></td>
+         <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">blob</a></td>
        {elseif $difftreelines[difftree].status == "D"}
-         <td><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a></td>
+         <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a></td>
          <td><span class="deletedfile">[deleted {$difftreelines[difftree].from_filetype}]</span></td>
-         <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$commit->GetHash()}&f={$difftreelines[difftree].file}">history</a></td>
+         <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$commit->GetHash()}&f={$difftreelines[difftree].file}">history</a></td>
        {elseif $difftreelines[difftree].status == "M" || $difftreelines[difftree].status == "T"}
          <td>
            {if $difftreelines[difftree].to_id != $difftreelines[difftree].from_id}
-             <a href="{$SCRIPT_NAME}?p={$project}&a=blobdiff&h={$difftreelines[difftree].to_id}&hp={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a>
+             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blobdiff&h={$difftreelines[difftree].to_id}&hp={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a>
            {else}
-             <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a>
+             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}" class="list">{$difftreelines[difftree].file}</a>
            {/if}
          </td>
          <td>{if $difftreelines[difftree].from_mode != $difftreelines[difftree].to_mode} <span class="changedfile">[changed{$difftreelines[difftree].modechange}]</span>{/if}</td>
          <td class="link">
-           <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">blob</a>{if $difftreelines[difftree].to_id != $difftreelines[difftree].from_id} | <a href="{$SCRIPT_NAME}?p={$project}&a=blobdiff&h={$difftreelines[difftree].to_id}&hp={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">diff</a>{/if} | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$commit->GetHash()}&f={$difftreelines[difftree].file}">history</a></td>
+           <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">blob</a>{if $difftreelines[difftree].to_id != $difftreelines[difftree].from_id} | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blobdiff&h={$difftreelines[difftree].to_id}&hp={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].file}">diff</a>{/if} | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$commit->GetHash()}&f={$difftreelines[difftree].file}">history</a></td>
        {elseif $difftreelines[difftree].status == "R"}
-         <td><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].to_file}" class="list">{$difftreelines[difftree].to_file}</a></td>
-         <td><span class="movedfile">[moved from <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].from_file}" class="list">{$difftreelines[difftree].from_file}</a> with {$difftreelines[difftree].similarity}% similarity{$difftreelines[difftree].simmodechg}]</span></td>
-         <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].to_file}">blob</a>{if $difftreelines[difftree].to_id != $difftreelines[difftree].from_id} | <a href="{$SCRIPT_NAME}?p={$project}&a=blobdiff&h={$difftreelines[difftree].to_id}&hp={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].to_file}">diff</a>{/if}</td>
+         <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].to_file}" class="list">{$difftreelines[difftree].to_file}</a></td>
+         <td><span class="movedfile">[moved from <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].from_file}" class="list">{$difftreelines[difftree].from_file}</a> with {$difftreelines[difftree].similarity}% similarity{$difftreelines[difftree].simmodechg}]</span></td>
+         <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].to_file}">blob</a>{if $difftreelines[difftree].to_id != $difftreelines[difftree].from_id} | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blobdiff&h={$difftreelines[difftree].to_id}&hp={$difftreelines[difftree].from_id}&hb={$commit->GetHash()}&f={$difftreelines[difftree].to_file}">diff</a>{/if}</td>
        {/if}
 
      </tr>

--- a/templates/commitdiff.tpl
+++ b/templates/commitdiff.tpl
@@ -10,13 +10,13 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | commitdiff | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hash}">tree</a><br /><a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff_plain&h={$hash}&hp={$hashparent}">plain</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}">commit</a> | commitdiff | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$hash}">tree</a><br /><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff_plain&h={$hash}&hp={$hashparent}">plain</a>
  </div>
  <div>
    <br /><br />
  </div>
  <div>
-   <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}" class="title">{$title}{if $commitref} <span class="tag">{$commitref}</span>{/if}</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}" class="title">{$title}{if $commitref} <span class="tag">{$commitref}</span>{/if}</a>
  </div>
  <div class="page_body">
    {foreach from=$comment item=line}
@@ -27,16 +27,16 @@
    {section name=difftree loop=$difftreelines}
      {if $difftreelines[difftree].status == "A"}
        <div class="diff_info">
-         {$difftreelines[difftree].to_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}{$difftreelines[difftree].file}{else}{$difftreelines[difftree].to_id}{/if}</a>(new)
+         {$difftreelines[difftree].to_type}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}{$difftreelines[difftree].file}{else}{$difftreelines[difftree].to_id}{/if}</a>(new)
        </div>
      {elseif $difftreelines[difftree].status == "D"}
        <div class="diff_info">
-         {$difftreelines[difftree].from_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].from_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}{$difftreelines[difftree].file}{else}{$difftreelines[difftree].from_id}{/if}</a>(deleted)
+         {$difftreelines[difftree].from_type}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].from_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}{$difftreelines[difftree].file}{else}{$difftreelines[difftree].from_id}{/if}</a>(deleted)
        </div>
      {elseif $difftreelines[difftree].status == "M"}
        {if $difftreelines[difftree].from_id != $difftreelines[difftree].to_id}
          <div class="diff_info">
-	   {$difftreelines[difftree].from_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].from_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}a/{$difftreelines[difftree].file}{else}{$difftreelines[difftree].from_id}{/if}</a> -&gt; {$difftreelines[difftree].to_type}:<a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$difftreelines[difftree].to_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}b/{$difftreelines[difftree].file}{else}{$difftreelines[difftree].to_id}{/if}</a>
+	   {$difftreelines[difftree].from_type}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].from_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}a/{$difftreelines[difftree].file}{else}{$difftreelines[difftree].from_id}{/if}</a> -&gt; {$difftreelines[difftree].to_type}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$difftreelines[difftree].to_id}&hb={$hash}&f={$difftreelines[difftree].file}">{if $difftreelines[difftree].file}b/{$difftreelines[difftree].file}{else}{$difftreelines[difftree].to_id}{/if}</a>
 	 </div>
        {/if}
      {/if}

--- a/templates/footer.tpl
+++ b/templates/footer.tpl
@@ -7,12 +7,8 @@
  *}
     <div class="page_footer">
       {if $project}
-        {if $projectdescription}
-          <div class="page_footer_text">{$projectdescription}</div>
-        {/if}
-	{if $validproject}
-          <a href="{$SCRIPT_NAME}?p={$project}&a=rss" class="rss_logo">RSS</a>
-	{/if}
+        <div class="page_footer_text">{$project->GetDescription()}</div>
+        <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=rss" class="rss_logo">RSS</a>
       {else}
         <a href="{$SCRIPT_NAME}?a=opml" class="rss_logo">OPML</a>
         <a href="{$SCRIPT_NAME}?a=project_index" class="rss_logo">TXT</a>

--- a/templates/header.tpl
+++ b/templates/header.tpl
@@ -10,10 +10,10 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
   <!-- gitphp web interface {$version}, (C) 2006 Christopher Han <xiphux@gmail.com> -->
   <head>
-    <title>{$pagetitle}{if $project && $validproject} :: {$project}{if $action && $validaction}/{$action}{/if}{/if}</title>
+    <title>{$pagetitle}{if $project} :: {$project->GetProject()}{if $action && $validaction}/{$action}{/if}{/if}</title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-    {if $validproject}
-      <link rel="alternate" title="{$project} log" href="{$SCRIPT_NAME}?p={$project}&a=rss" type="application/rss+xml" />
+    {if $project}
+      <link rel="alternate" title="{$project->GetProject()} log" href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=rss" type="application/rss+xml" />
     {/if}
     <link rel="stylesheet" href="css/{$stylesheet}" type="text/css" />
     <style type="text/css">
@@ -29,15 +29,15 @@
         <img src="images/git-logo.png" width="72" height="27" alt="git" class="logo" />
       </a>
       <a href="index.php">projects</a> / 
-      {if $project && $validproject}
-        <a href="{$SCRIPT_NAME}?p={$project}&a=summary">{$project}</a>
+      {if $project}
+        <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">{$project->GetProject()}</a>
         {if $action && $validaction}
            / {$action}
         {/if}
         {if $enablesearch}
           <form method="get" action="index.php" enctype="application/x-www-form-urlencoded">
             <div class="search">
-              <input type="hidden" name="p" value="{$project}" />
+              <input type="hidden" name="p" value="{$project->GetProject()}" />
               <input type="hidden" name="a" value="search" />
               <input type ="hidden" name="h" value="{if $hashbase}{$hashbase}{elseif $hash}{$hash}{else}HEAD{/if}" />
               <select name="st">

--- a/templates/heads.tpl
+++ b/templates/heads.tpl
@@ -10,11 +10,11 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">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={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$head}">tree</a>
    <br /><br />
  </div>
  <div>
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary" class="title">&nbsp;</a>
  </div>
  <table cellspacing="0">
    {* Loop and display each head *}
@@ -22,8 +22,8 @@
      {assign var=commit value=$head->GetCommit()}
      <tr class="{cycle values="light,dark"}">
        <td><em>{$commit->GetAge()|agestring}</em></td>
-       <td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$head->GetName()}" class="list"><strong>{$head->GetName()}</strong></a></td>
-       <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$head->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/heads/{$head->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h=refs/heads/{$head->GetName()}&hb={$commit->GetHash()}">tree</a></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>
      </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}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hash}">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={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$tree}&hb={$hash}">tree</a>
    <br /><br />
  </div>
  <div>
-   <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}" class="title">{$title}
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}" class="title">{$title}
    {if $hashbaseref}
      <span class="tag">{$hashbaseref}</span>
    {/if}
@@ -23,12 +23,12 @@
  <div class="page_path">
    {* File path *}
    <b>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hash}&h={$hash}">[{$project}]</a> / 
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hash}&h={$hash}">[{$project->GetProject()}]</a> / 
      {foreach from=$paths item=path name=paths}
        {if $smarty.foreach.paths.last}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$path.tree}&f={$path.full}">{$path.short}</a>
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$path.tree}&f={$path.full}">{$path.short}</a>
        {else}
-         <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hash}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hash}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
        {/if}
      {/foreach}
    </b>
@@ -39,8 +39,8 @@
      <tr class="{cycle values="light,dark"}">
        <td title="{$historylines[history].agestringage}"><i>{$historylines[history].agestringdate}</i></td>
        <td><i>{$historylines[history].authorname}</i></td>
-       <td><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$historylines[history].commit}" class="list"><b>{$historylines[history].title}{if $historylines[history].commitref} <span class="tag">{$historylines[history].commitref}</span>{/if}</b></a></td>
-       <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$historylines[history].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$historylines[history].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=blob&hb={$historylines[history].commit}&f={$historylines[history].file}">blob</a>{if $historylines[history].blob && $historylines[history].blobparent} | <a href="{$SCRIPT_NAME}?p={$project}&a=blobdiff&h={$historylines[history].blob}&hp={$historylines[history].blobparent}&hb={$historylines[history].commit}&f={$historylines[history].file}">diff to current</a>{/if}
+       <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$historylines[history].commit}" class="list"><b>{$historylines[history].title}{if $historylines[history].commitref} <span class="tag">{$historylines[history].commitref}</span>{/if}</b></a></td>
+       <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$historylines[history].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$historylines[history].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&hb={$historylines[history].commit}&f={$historylines[history].file}">blob</a>{if $historylines[history].blob && $historylines[history].blobparent} | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blobdiff&h={$historylines[history].blob}&hp={$historylines[history].blobparent}&hb={$historylines[history].commit}&f={$historylines[history].file}">diff to current</a>{/if}
        </td>
      </tr>
    {/section}

--- a/templates/log.tpl
+++ b/templates/log.tpl
@@ -10,22 +10,22 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}">shortlog</a> | log | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$hash}&hb={$hash}">tree</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash}">shortlog</a> | log | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$hash}&hb={$hash}">tree</a>
    <br />
    {if ($hash != $head) || $page}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=log">HEAD</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log">HEAD</a>
    {else}
      HEAD
    {/if}
    &sdot; 
    {if $page > 0}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
    {else}
      prev
    {/if}
    &sdot; 
    {if $revlistcount > 100}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
    {else}
      next
    {/if}
@@ -33,7 +33,7 @@
  </div>
  {if $norevlist}
    <div>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary" class="title">&nbsp</a>
    </div>
    <div class="page_body">
      Last change {$lastchange}.
@@ -43,7 +43,7 @@
  {* Display each commit *}
  {section name=log loop=$commitlines}
    <div>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}" class="title"><span class="age">{$commitlines[log].agestring}</span>{$commitlines[log].title}
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commitlines[log].commit}" class="title"><span class="age">{$commitlines[log].agestring}</span>{$commitlines[log].title}
        {if $commitlines[log].commitref}
          <span class="tag">{$commitlines[log].commitref}</span>
        {/if}
@@ -51,7 +51,7 @@
    </div>
    <div class="title_text">
      <div class="log_link">
-       <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commitlines[log].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$commitlines[log].commit}&hb={$commitlines[log].commit}">tree</a>
+       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commitlines[log].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commitlines[log].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$commitlines[log].commit}&hb={$commitlines[log].commit}">tree</a>
        <br />
      </div>
      <em>{$commitlines[log].authorname} [{$commitlines[log].authorepoch|date_format:"%a, %d %b %Y %H:%M:%S %z"}]</em><br />

--- a/templates/project.tpl
+++ b/templates/project.tpl
@@ -10,7 +10,7 @@
 
  {* Nav *}
  <div class="page_nav">
-   summary | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree">tree</a>
+   summary | <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={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree">tree</a>
    <br /><br />
  </div>
  <div class="title">&nbsp;</div>
@@ -27,27 +27,27 @@
    {/if}
  </table>
  <div class="title">
-   <a class="title" href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a>
+   <a class="title" href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">shortlog</a>
  </div>
  <table cellspacing="0">
    {* Recent revisions *}
    {section name=rev max=17 loop=$revlist}
      {if $smarty.section.rev.index == 16}
        <tr class="light">
-         <td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">...</a></td>
+         <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">...</a></td>
        </tr>
      {else}
          <tr class="{cycle name=revs values="light,dark"}">
          <td><em>{$revlist[rev]->GetAge()|agestring}</em></td>
          <td><em>{$revlist[rev]->GetAuthorName()}</em></td>
          <td>
-           <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$revlist[rev]->GetHash()}" class="list" title="{$revlist[rev]->GetTitle()}"><strong>{$revlist[rev]->GetTitle(50)}</strong></a>
+           <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$revlist[rev]->GetHash()}" class="list" title="{$revlist[rev]->GetTitle()}"><strong>{$revlist[rev]->GetTitle(50)}</strong></a>
 	   <span class="refs">
 	   {assign var=revheads value=$revlist[rev]->GetHeads()}
 	   {if count($revheads) > 0}
 	     {foreach item=revhead from=$revheads}
 	     <span class="head">
-	       <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$revhead->GetName()}">{$revhead->GetName()}</a>
+	       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/heads/{$revhead->GetName()}">{$revhead->GetName()}</a>
 	     </span>
 	     {/foreach}
 	   {/if}
@@ -55,13 +55,13 @@
 	   {if count($revtags) > 0}
 	     {foreach item=revtag from=$revtags}
 	     <span class="tag">
-	       <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$revtag->GetName()}">{$revtag->GetName()}</a>
+	       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tag&h={$revtag->GetName()}">{$revtag->GetName()}</a>
 	     </span>
 	     {/foreach}
 	   {/if}
 	   </span>
          </td>
-         <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$revlist[rev]->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$revlist[rev]->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$revlist[rev]->GetHash()}&hb={$revlist[rev]->GetHash()}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$revlist[rev]->GetHash()}">snapshot</a></td>
+         <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$revlist[rev]->GetHash()}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$revlist[rev]->GetHash()}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$revlist[rev]->GetHash()}&hb={$revlist[rev]->GetHash()}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=snapshot&h={$revlist[rev]->GetHash()}">snapshot</a></td>
        </tr>
      {/if}
    {/section}
@@ -69,30 +69,30 @@
  {if $taglist}
    {* Tags *}
    <div class="title">
-     <a href="{$SCRIPT_NAME}?p={$project}&a=tags" class="title">tags</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tags" class="title">tags</a>
    </div>
    <table cellspacing="0">
      {section name=tag max=17 loop=$taglist}
        <tr class="{cycle name=tags values="light,dark"}">
          {if $smarty.section.tag.index == 16}
-           <td><a href="{$SCRIPT_NAME}?p={$project}&a=tags">...</a></td>
+           <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tags">...</a></td>
          {else}
 	   {assign var=object value=$taglist[tag]->GetObject()}
            <td><em>{$object->GetAge()|agestring}</em></td>
-           <td><a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag]->GetType()}&h={$object->GetHash()}" class="list"><strong>{$taglist[tag]->GetName()}</strong></a></td>
+           <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a={$taglist[tag]->GetType()}&h={$object->GetHash()}" class="list"><strong>{$taglist[tag]->GetName()}</strong></a></td>
            <td>
 	     {assign var=comment value=$taglist[tag]->GetComment()}
              {if count($comment) > 0}
-               <a class="list" href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag]->GetName()}">{$comment[0]}</a>
+               <a class="list" href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tag&h={$taglist[tag]->GetName()}">{$comment[0]}</a>
              {/if}
            </td>
            <td class="link">
              {if !$taglist[tag]->LightTag()}
-   	       <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$taglist[tag]->GetName()}">tag</a> | 
+   	       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tag&h={$taglist[tag]->GetName()}">tag</a> | 
              {/if}
-             <a href="{$SCRIPT_NAME}?p={$project}&a={$taglist[tag]->GetType()}&h={$taglist[tag]->GetHash()}">{$taglist[tag]->GetType()}</a>
+             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a={$taglist[tag]->GetType()}&h={$taglist[tag]->GetHash()}">{$taglist[tag]->GetType()}</a>
 	     {if $taglist[tag]->GetType() == "commit"}
-	      | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/tags/{$taglist[tag]->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/tags/{$taglist[tag]->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$object->GetHash()}">snapshot</a>{/if}
+	      | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/tags/{$taglist[tag]->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h=refs/tags/{$taglist[tag]->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=snapshot&h={$object->GetHash()}">snapshot</a>{/if}
            </td>
          {/if}
        </tr>
@@ -102,18 +102,18 @@
  {if $headlist}
    {* Heads *}
    <div class="title">
-     <a href="{$SCRIPT_NAME}?p={$project}&a=heads" class="title">heads</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=heads" class="title">heads</a>
    </div>
    <table cellspacing="0">
      {section name=head max=17 loop=$headlist}
        <tr class="{cycle name=heads values="light,dark"}">
          {if $smarty.section.head.index == 16}
-           <td><a href="{$SCRIPT_NAME}?p={$project}&a=heads">...</a></td>
+           <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>
-           <td><a href="{$SCRIPT_NAME}?p={$project}&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}&a=shortlog&h=refs/heads/{$headlist[head]->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/heads/{$headlist[head]->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h=refs/heads/{$headlist[head]->GetName()}&hb={$commit->GetHash()}">tree</a></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>
          {/if}
        </tr>
      {/section}

--- a/templates/rss.tpl
+++ b/templates/rss.tpl
@@ -8,9 +8,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
   <channel>
-    <title>{$project}</title>
-    <link>{$self}?p={$project}&amp;a=summary</link>
-    <description>{$project} log</description>
+    <title>{$project->GetProject()}</title>
+    <link>{$self}?p={$project->GetProject()}&amp;a=summary</link>
+    <description>{$project->GetProject()} log</description>
     <language>en</language>
 
     {section name=rssitem loop=$commitlines}
@@ -18,8 +18,8 @@
         <title>{$commitlines[rssitem].committerepoch|date_format:"%d %b %R"} - {$commitlines[rssitem].title|escape:'html'}</title>
         <author>{$commitlines[rssitem].author|escape:'html'}</author>
         <pubDate>{$commitlines[rssitem].committerepoch|date_format:"%a, %d %b %Y %H:%M:%S %z"}</pubDate>
-        <guid isPermaLink="true">{$self}?p={$project}&amp;a=commit&amp;h={$commitlines[rssitem].commit}</guid>
-        <link>{$self}?p={$project}&amp;a=commit&amp;h={$commitlines[rssitem].commit}</link>
+        <guid isPermaLink="true">{$self}?p={$project->GetProject()}&amp;a=commit&amp;h={$commitlines[rssitem].commit}</guid>
+        <link>{$self}?p={$project->GetProject()}&amp;a=commit&amp;h={$commitlines[rssitem].commit}</link>
         <description>{$commitlines[rssitem].title|escape:'html'}</description>
         <content:encoded>
           <![CDATA[

--- a/templates/search.tpl
+++ b/templates/search.tpl
@@ -10,49 +10,49 @@
 
 {* Nav *}
 <div class="page_nav">
-  <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$treehash}&hb={$hash}">tree</a>
+  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treehash}&hb={$hash}">tree</a>
   <br />
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&s={$search}&st={$searchtype}">first</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash}&s={$search}&st={$searchtype}">first</a>
   {else}
     first
   {/if}
     &sdot; 
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&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={$hash}&s={$search}&st={$searchtype}{if $page > 1}&pg={$page-1}{/if}" accesskey="p" title="Alt-p">prev</a>
   {else}
     prev
   {/if}
     &sdot; 
   {if $revlistcount > 100}
-    <a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
   {else}
     next
   {/if}
   <br />
 </div>
 <div>
-  <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}" class="title">{$title}</a>
+  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}" class="title">{$title}</a>
 </div>
 <table cellspacing="0">
   {* Print each match *}
   {section name=match loop=$commitlines}
     <tr class="{cycle values="light,dark"}">
-      <td title="{$commitlines[match].agestringage}"><i>{$commitlines[match].agestringdate}</i></td>
-      <td><i>{$commitlines[match].authorname}</i></td>
-      <td><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[match].commit}" class="list" {if $title}title="{$commitlines[match].title}"{/if}><b>{$commitlines[match].title_short}</b>
+      <td title="{$commitlines[match].agestringage}"><em>{$commitlines[match].agestringdate}</em></td>
+      <td><em>{$commitlines[match].authorname}</em></td>
+      <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commitlines[match].commit}" class="list" {if $title}title="{$commitlines[match].title}"{/if}><strong>{$commitlines[match].title_short}</strong>
         {foreach from=$commitlines[match].matches item=line name=match}
           {if $smarty.foreach.match.first}<br />{/if}{$line}<br />
         {/foreach}
       </td>
-      <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[match].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commitlines[match].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$commitlines[match].committree}&hb={$commitlines[match].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$commitlines[match].commit}">snapshot</a>
+      <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commitlines[match].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commitlines[match].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$commitlines[match].committree}&hb={$commitlines[match].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=snapshot&h={$commitlines[match].commit}">snapshot</a>
       </td>
     </tr>
   {/section}
 
   {if $revlistcount > 100}
     <tr>
-      <td><a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&s={$search}&st={$searchtype}&pg={$page+1}" title="Alt-n">next</a></td>
+      <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash}&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}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$treehash}&hb={$hash}">tree</a>
+  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treehash}&hb={$hash}">tree</a>
   <br />
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&s={$search}&st={$searchtype}">first</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash}&s={$search}&st={$searchtype}">first</a>
   {else}
     first
   {/if}
     &sdot; 
   {if $page > 0}
-    <a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&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={$hash}&s={$search}&st={$searchtype}{if $page > 1}&pg={$page-1}{/if}" accesskey="p" title="Alt-p">prev</a>
   {else}
     prev
   {/if}
     &sdot; 
   {if $filesearchcount > 100}
-    <a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+    <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash}&s={$search}&st={$searchtype}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
   {else}
     next
   {/if}
   <br />
 </div>
 <div>
-  <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}" class="title">{$title}</a>
+  <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}" class="title">{$title}</a>
 </div>
 <table cellspacing="0">
   {* Print each match *}
@@ -40,9 +40,9 @@
     <tr class="{cycle values="light,dark"}">
       <td>
         {if $filesearchlines[match].tree}
-          <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}" class="list"><b>{$filesearchlines[match].filename}</b></a>
+          <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}" class="list"><b>{$filesearchlines[match].filename}</b></a>
         {else}
-          <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}" class="list"><b>{$filesearchlines[match].filename}</b></a>
+          <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}" class="list"><b>{$filesearchlines[match].filename}</b></a>
           {foreach from=$filesearchlines[match].matches item=line name=match}
             {if $smarty.foreach.match.first}<br />{/if}<span class="respectwhitespace">{$line}</span><br />
           {/foreach}
@@ -50,9 +50,9 @@
       </td>
       <td class="link">
         {if $filesearchlines[match].tree}
-          <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}">tree</a>
+          <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}">tree</a>
         {else}
-          <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$hash}&f={$filesearchlines[match].file}">history</a>
+          <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$filesearchlines[match].hash}&hb={$hash}&f={$filesearchlines[match].file}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$hash}&f={$filesearchlines[match].file}">history</a>
         {/if}
       </td>
     </tr>
@@ -60,7 +60,7 @@
 
   {if $filesearchcount > 100}
     <tr>
-      <td><a href="{$SCRIPT_NAME}?p={$project}&a=search&h={$hash}&s={$search}&st={$searchtype}&pg={$page+1}" title="Alt-n">next</a></td>
+      <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=search&h={$hash}&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,51 +10,51 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | shortlog | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$hash}&hb={$hash}">tree</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary">summary</a> | shortlog | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hash}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hash}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$hash}&hb={$hash}">tree</a>
    <br />
    {if ($hash != $head) || $page}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">HEAD</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog">HEAD</a>
    {else}
      HEAD
    {/if}
      &sdot; 
    {if $page > 0}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash}&pg={$page-1}" accesskey="p" title="Alt-p">prev</a>
    {else}
      prev
    {/if}
      &sdot; 
    {if $revlistcount > 100}
-     <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash}&pg={$page+1}" accesskey="n" title="Alt-n">next</a>
    {else}
      next
    {/if}
    <br />
  </div>
  <div>
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary" class="title">&nbsp;</a>
  </div>
  <table cellspacing="0">
    {* Display each log entry *}
    {section name=log loop=$commitlines}
      <tr class="{cycle values="light,dark"}">
-       <td title="{$commitlines[log].agestringage}"><i>{$commitlines[log].agestringdate}</i></td>
-       <td><i>{$commitlines[log].authorname}</i></td>
+       <td title="{$commitlines[log].agestringage}"><em>{$commitlines[log].agestringdate}</em></td>
+       <td><em>{$commitlines[log].authorname}</em></td>
        <td>
-         <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}" class="list" {if $commitlines[log].title}title="{$commitlines[log].title}"{/if}><b>{$commitlines[log].title_short}
+         <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commitlines[log].commit}" class="list" {if $commitlines[log].title}title="{$commitlines[log].title}"{/if}><strong>{$commitlines[log].title_short}
          {if $commitlines[log].commitref}
            <span class="tag">{$commitlines[log].commitref}</span>
          {/if}
-         </b>
+         </strong>
        </td>
-       <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$commitlines[log].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$commitlines[log].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$commitlines[log].commit}&hb={$commitlines[log].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$commitlines[log].commit}">snapshot</a>
+       <td class="link"><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$commitlines[log].commit}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$commitlines[log].commit}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$commitlines[log].commit}&hb={$commitlines[log].commit}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=snapshot&h={$commitlines[log].commit}">snapshot</a>
        </td>
      </tr>
    {/section}
 
    {if $revlistcount > 100}
      <tr>
-       <td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hash}&pg={$page+1}" title="Alt-n">next</a></td>
+       <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h={$hash}&pg={$page+1}" title="Alt-n">next</a></td>
      </tr>
    {/if}
  </table>

--- a/templates/tag.tpl
+++ b/templates/tag.tpl
@@ -10,20 +10,20 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">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={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$head}">tree</a>
    <br /><br />
  </div>
  {* Tag data *}
  <div>
-   <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hash}" class="title">{$tag->GetName()}</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hash}" 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}&a={$tag->GetType()}&h={$object->GetHash()}" class="list">{$object->GetHash()}</a></td>
-       <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a={$tag->GetType()}&h={$object->GetHash()}">{$tag->GetType()}</a></td>
+       <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>
      {if $tag->GetTagger()}
        <tr>

--- a/templates/tags.tpl
+++ b/templates/tags.tpl
@@ -10,11 +10,11 @@
 
  {* Nav *}
  <div class="page_nav">
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">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={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$head}">tree</a>
    <br /><br />
  </div>
  <div>
-   <a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a>
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=summary" class="title">&nbsp;</a>
  </div>
  {* Display tags *}
  <table cellspacing="0">
@@ -22,20 +22,20 @@
      {assign var=object value=$tag->GetObject()}
      <tr class="{cycle values="light,dark"}">
        <td><em>{$object->GetAge()|agestring}</em></td>
-       <td><a href="{$SCRIPT_NAME}?p={$project}&a={$tag->GetType()}&h={$object->GetHash()}" class="list"><strong>{$tag->GetName()}</strong></a></td>
+       <td><a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a={$tag->GetType()}&h={$object->GetHash()}" class="list"><strong>{$tag->GetName()}</strong></a></td>
        <td>
          {assign var=comment value=$tag->GetComment()}
          {if count($comment) > 0}
-           <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$tag->GetName()}" class="list">{$comment[0]}</a>
+           <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tag&h={$tag->GetName()}" class="list">{$comment[0]}</a>
          {/if}
        </td>
        <td class="link">
          {if !$tag->LightTag()}
-	   <a href="{$SCRIPT_NAME}?p={$project}&a=tag&h={$tag->GetName()}">tag</a> | 
+	   <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tag&h={$tag->GetName()}">tag</a> | 
 	 {/if}
-	 <a href="{$SCRIPT_NAME}?p={$project}&a={$tag->GetType()}&h={$object->GetHash()}">{$tag->GetType()}</a>
+	 <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a={$tag->GetType()}&h={$object->GetHash()}">{$tag->GetType()}</a>
 	 {if $tag->GetType() == "commit"}
-	   | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/tags/{$tag->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/tags/{$tag->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$object->GetHash()}">snapshot</a>
+	   | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=shortlog&h=refs/tags/{$tag->GetName()}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h=refs/tags/{$tag->GetName()}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=snapshot&h={$object->GetHash()}">snapshot</a>
 	 {/if}
        </td>
      </tr>

--- a/templates/tree.tpl
+++ b/templates/tree.tpl
@@ -11,10 +11,10 @@
  {* Nav *}
  {if $fullnav}
    <div class="page_nav">
-     <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h={$hashbase}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h={$hashbase}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hashbase}">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={$hashbase}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=log&h={$hashbase}">log</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commitdiff&h={$hashbase}">commitdiff</a> | tree<br /><br />
    </div>
    <div>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$hashbase}" class="title">{$title}
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=commit&h={$hashbase}" class="title">{$title}
        {if $hashbaseref}
          <span class="tag">{$hashbaseref}</span>
        {/if}
@@ -27,9 +27,9 @@
  {* Path *}
  <div class="page_path">
    <b>
-     <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project}]</a> / 
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$hashbase}">[{$project->GetProject()}]</a> / 
      {foreach from=$paths item=path}
-       <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
+       <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$hashbase}&h={$path.tree}&f={$path.full}">{$path.short}</a> / 
      {/foreach}
    </b>
  </div>
@@ -41,17 +41,17 @@
          <td class="monospace">{$treelines[tree].filemode}</td>
          {if $treelines[tree].type == "blob"}
            <td class="list">
-             <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}" class="list">{$treelines[tree].name}</a>
+             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}" class="list">{$treelines[tree].name}</a>
 	   </td>
            <td class="link">
-	     <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$hashbase}&f={if $base}{$base}{/if}{$treelines[tree].name}">history</a>
+	     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=history&h={$hashbase}&f={if $base}{$base}{/if}{$treelines[tree].name}">history</a>
 	   </td>
          {elseif $treelines[tree].type == "tree"}
            <td class="list">
-             <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">{$treelines[tree].name}</a>
+             <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">{$treelines[tree].name}</a>
 	   </td>
            <td class="link">
-	     <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">tree</a>
+	     <a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&h={$treelines[tree].hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$treelines[tree].name}">tree</a>
 	   </td>
          {/if}
        </tr>

comments