added hash_base system (base refs gets stored in the _SESSION)
[phpgitweb.git] / htdocs / lib / ContentProvider.class.php
index cd88b91e8b025b8e7347f849bc41f7fa22a8ce25..76b2eb0f1e1a508053a9df9d46d1c8048fbd703a 100644 (file)
@@ -41,6 +41,8 @@ class ContentProvider {
                        return;
                if(!array_key_exists(strtolower($name), $this->content))
                        $this->content[strtolower($name)] = array();
+               if(!is_array($this->content[strtolower($name)]))
+                       $this->content[strtolower($name)] = array($this->content[strtolower($name)]);
                $this->content[strtolower($name)][] = $value;
        }
        
@@ -76,9 +78,6 @@ class ContentProvider {
                case "year":
                        $rep = date("Y");
                        break;
-               case "title":
-                       $rep = GitConfig::GITWEB_TITLE;
-                       break;
                case "rendertime":
                        $rep = "%rendertime%"; //gets replaced later
                        break;
@@ -114,6 +113,7 @@ class ContentProvider {
                        $template_html = $this->load_template($this->template, $subtemplate);
                }
                $template_html = preg_replace_callback('/%([^%]*)%/', array($this, "replace_placeholder"), $template_html);
+               $template_html = preg_replace_callback('/%([^%]*)%/', array($this, "replace_placeholder"), $template_html);
                
                return $template_html;
        }