]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix template rendering for 'blank' templates
authorMorris Jobke <hey@morrisjobke.de>
Fri, 25 Jul 2014 22:04:49 +0000 (00:04 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 30 Jul 2014 08:34:13 +0000 (10:34 +0200)
lib/public/appframework/http/templateresponse.php

index 2200a38beca93d4c60307e1071ca7f5146a39f89..031e0fcc978b55500c7fdf05e3598cf27ae8a0b2 100644 (file)
@@ -124,8 +124,10 @@ class TemplateResponse extends Response {
         * @return string the rendered html
         */
        public function render(){
+               // \OCP\Template needs an empty string instead of 'blank' for an unwrapped response
+               $renderAs = $this->renderAs === 'blank' ? '' : $this->renderAs;
 
-               $template = new \OCP\Template($this->appName, $this->templateName, $this->renderAs);
+               $template = new \OCP\Template($this->appName, $this->templateName, $renderAs);
 
                foreach($this->params as $key => $value){
                        $template->assign($key, $value);