diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-03-02 18:21:08 +0100 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-03-02 18:21:08 +0100 |
commit | ede34c17dd04fcc13ce7870947fc66aba1ece274 (patch) | |
tree | 8e35df9efaaeacdd0dc1426d890d5d7611d5d9cf /lib/template.php | |
parent | 66ac355f7845c56589dcd6c10a92a25af48c97fc (diff) | |
download | nextcloud-server-ede34c17dd04fcc13ce7870947fc66aba1ece274.tar.gz nextcloud-server-ede34c17dd04fcc13ce7870947fc66aba1ece274.zip |
Make the templates working again.
Diffstat (limited to 'lib/template.php')
-rw-r--r-- | lib/template.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/template.php b/lib/template.php index 7321d9957f5..6415ab6a845 100644 --- a/lib/template.php +++ b/lib/template.php @@ -66,7 +66,7 @@ class OC_TEMPLATE{ } public function append( $a, $b ){ - if( array_key_exists( $this->vars[$a] )){ + if( array_key_exists( $a, $this->vars )){ if( is_a( $this->vars[$a], "array" )){ $this->vars[$a][] = $b; } @@ -150,7 +150,7 @@ class OC_TEMPLATE{ // Execute the template ob_start(); - oc_include( $this->template ); + include( $this->template ); // <-- we have to use include because we pass $_! $data = ob_get_contents(); ob_end_clean(); @@ -167,7 +167,9 @@ class OC_TEMPLATE{ */ public static function printUserPage( $application, $name, $parameters = array() ){ $content = new OC_TEMPLATE( $application, $name, "user" ); - $content->assign( $parameters ); + foreach( $parameters as $key => $value ){ + $content->assign( $key, $value ); + } return $content->printPage(); } @@ -180,7 +182,9 @@ class OC_TEMPLATE{ */ public static function printAdminPage( $application, $name, $parameters = array() ){ $content = new OC_TEMPLATE( $application, $name, "admin" ); - $content->assign( $parameters ); + foreach( $parameters as $key => $value ){ + $content->assign( $key, $value ); + } return $content->printPage(); } @@ -193,7 +197,9 @@ class OC_TEMPLATE{ */ public static function printGuestPage( $application, $name, $parameters = array() ){ $content = new OC_TEMPLATE( $application, $name, "guest" ); - $content->assign( $parameters ); + foreach( $parameters as $key => $value ){ + $content->assign( $key, $value ); + } return $content->printPage(); } } |