Merge branch 'master' of http://git.gitphp.org/gitphp master
Merge branch 'master' of http://git.gitphp.org/gitphp

file:b/.gitignore (new)
--- /dev/null
+++ b/.gitignore
@@ -1,1 +1,5 @@
+gitweb.cgi
+static/*.*
+templates/analitics.tpl
+templates/fbcomments.tpl
 

--- a/include/git/taglist/TagList.class.php
+++ b/include/git/taglist/TagList.class.php
@@ -122,6 +122,21 @@
 		$this->dataLoaded = true;
 
 		list($this->refs, $this->commits) = $this->strategy->Load($this);
+		
+		if (!$this->commits) {
+			// dereference commits if the strategy doesn't do it for us
+			// TODO: is there a way to do this without introducing strategy specific logic in the core class?
+			$this->commits = array();
+			$objManager = $this->GetProject()->GetObjectManager();
+			foreach ($this->refs as $tag => $tagHash) {
+				$tagObj = $objManager->GetTag($tag, $tagHash);
+				$commitHash = $tagObj->GetCommitHash();
+				if (!empty($commitHash)) {
+					$this->commits[$tag] = $commitHash;
+				}
+			}
+		}
+		
 		foreach ($this->commits as $ref => $hash) $this->invertedRefs[$hash][] = $ref;
 	}
 

--- a/include/git/taglist/TagListLoad_Raw.class.php
+++ b/include/git/taglist/TagListLoad_Raw.class.php
@@ -18,16 +18,7 @@
 	public function Load($tagList)
 	{
 		$tags = $this->GetRefs($tagList, 'tags');
-		$commits = array();
-		$objManager = $tagList->GetProject()->GetObjectManager();
-		foreach ($tags as $tag => $tagHash) {
-			$tagObj = $objManager->GetTag($tag, $tagHash);
-			$commitHash = $tagObj->GetCommitHash();
-			if (!empty($commitHash)) {
-				$commits[$tag] = $commitHash;
-			}
-		}
-		return array($tags, $commits);
+		return array($tags, null);
 	}
 
 	/**

--- a/templates/main.tpl
+++ b/templates/main.tpl
@@ -17,6 +17,9 @@
     {$pagetitle}
     {/block}
     </title>
+    {if file_exists("templates/analitics.tpl")}
+    {include file="analitics.tpl"}
+    {/if}
     {block name=feeds}
     {/block}
     {block name=links}
@@ -137,6 +140,9 @@
 {block name=main}
 
 {/block}
+    {if file_exists("templates/fbcomments.tpl")}
+    {include file="fbcomments.tpl"}
+    {/if}
     <div class="page_footer">
       {block name=footer}
       {/block}

comments