summaryrefslogtreecommitdiffstats
path: root/lib/template.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-06-24 22:06:40 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-06-24 22:09:55 +0200
commit155f62bcf6082264f402d634ebbef9fe78dda3a3 (patch)
treee979f01116a00949dc7b7384b14aa67a8af19032 /lib/template.php
parent2098cbd8222fe7657fec5538798426495a9b9888 (diff)
downloadnextcloud-server-155f62bcf6082264f402d634ebbef9fe78dda3a3.tar.gz
nextcloud-server-155f62bcf6082264f402d634ebbef9fe78dda3a3.zip
allow plugins/apps to add custom headers to all pages
Diffstat (limited to 'lib/template.php')
-rw-r--r--lib/template.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/template.php b/lib/template.php
index 992fa2de76c..9393fe6908e 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -206,9 +206,6 @@ class OC_TEMPLATE{
$search=new OC_TEMPLATE( 'core', 'part.searchbox');
$search->assign('searchurl',OC_HELPER::linkTo( 'search', 'index.php' ));
$page->assign('searchbox', $search->fetchPage());
-
- // Add custom headers
- $page->assign('headers',$this->headers);
// Add navigation entry
$page->assign( "navigation", OC_APP::getNavigation());
@@ -220,9 +217,6 @@ class OC_TEMPLATE{
$search->assign('searchurl',OC_HELPER::linkTo( 'search', 'index.php' ));
$page->assign('searchbox', $search->fetchPage());
- // Add custom headers
- $page->assign('headers',$this->headers);
-
// Add menu data
if( OC_GROUP::inGroup( $_SESSION["user_id"], "admin" )){
$page->assign( "adminnavigation", OC_APP::getAdminNavigation());
@@ -232,8 +226,6 @@ class OC_TEMPLATE{
else
{
$page = new OC_TEMPLATE( "core", "layout.guest" );
- // Add custom headers
- $page->assign('headers',$this->headers);
}
// Add the css and js files
@@ -259,7 +251,13 @@ class OC_TEMPLATE{
$page->append( "cssfiles", "$WEBROOT/core/$style.css" );
}
}
-
+
+ // Add custom headers
+ $page->assign('headers',$this->headers);
+ foreach(OC_UTIL::$headers as $header){
+ $page->append('headers',$header);
+ }
+
// Add css files and js files
$page->assign( "content", $data );
return $page->fetchPage();