summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-01-25 19:14:27 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-27 12:25:52 +0100
commit0655df09d6cfcec1084680a6ef9082422a1ca578 (patch)
treee1853b6cb1aa603e3db9b90f3166ccfc99234207 /lib
parentd0a6368a8bc9b03cba66c4a485aa001da187b2e3 (diff)
downloadnextcloud-server-0655df09d6cfcec1084680a6ef9082422a1ca578.tar.gz
nextcloud-server-0655df09d6cfcec1084680a6ef9082422a1ca578.zip
Pass template parameters to parent template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/template.php8
-rw-r--r--lib/public/AppFramework/Http/TemplateResponse.php2
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index c5279bff6b8..a362b581fe2 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -206,6 +206,12 @@ class OC_Template extends \OC\Template\Base {
if( $this->renderAs ) {
$page = new TemplateLayout($this->renderAs, $this->app);
+ if(is_array($additionalParams)) {
+ foreach ($additionalParams as $key => $value) {
+ $page->assign($key, $value);
+ }
+ }
+
// Add custom headers
$headers = '';
foreach(OC_Util::$headers as $header) {
@@ -226,7 +232,7 @@ class OC_Template extends \OC\Template\Base {
$page->assign('headers', $headers);
$page->assign('content', $data);
- return $page->fetchPage();
+ return $page->fetchPage($additionalParams);
}
return $data;
diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php
index ccb0c61bfd4..0e31f780d7a 100644
--- a/lib/public/AppFramework/Http/TemplateResponse.php
+++ b/lib/public/AppFramework/Http/TemplateResponse.php
@@ -154,7 +154,7 @@ class TemplateResponse extends Response {
$template->assign($key, $value);
}
- return $template->fetchPage();
+ return $template->fetchPage($this->params);
}
}