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;
}
case "year":
$rep = date("Y");
break;
- case "title":
- $rep = GitConfig::GITWEB_TITLE;
- break;
case "rendertime":
$rep = "%rendertime%"; //gets replaced later
break;
else {
$template_html = $this->load_template($this->template, $subtemplate);
}
- $template_html = preg_replace_callback('/%([^%]*)%/', array($this, "replace_placeholder"), $template_html);
+ $template_html = preg_replace('/([\r\n]*)$/mD', '', $template_html);
+ $template_html = preg_replace_callback('/%([^%\n]*)%/', array($this, "replace_placeholder"), $template_html);
+ $template_html = preg_replace_callback('/%([^%\n]*)%/', array($this, "replace_placeholder"), $template_html);
return $template_html;
}