summaryrefslogtreecommitdiffstats
path: root/lib/private
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/private
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/private')
-rw-r--r--lib/private/legacy/template.php8
1 files changed, 7 insertions, 1 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;