summaryrefslogtreecommitdiffstats
path: root/controllers/controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/controller.php')
-rw-r--r--controllers/controller.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/controllers/controller.php b/controllers/controller.php
index 73ad3ad4d..032cb45ee 100644
--- a/controllers/controller.php
+++ b/controllers/controller.php
@@ -16,8 +16,8 @@ class Controller {
protected $userId;
protected $trans;
-
-
+
+
public function __construct(){
$this->userId = \OCP\USER::getUser();
$this->trans = \OC_L10N::get('news');
@@ -51,7 +51,7 @@ class Controller {
* @param $value the value that you want to store
*/
protected function setUserValue($key, $value){
- \OCP\Config::setUserValue($this->userId, 'news', $key, $value);
+ \OCP\Config::setUserValue($this->userId, 'news', $key, $value);
}
@@ -73,22 +73,22 @@ class Controller {
* @param $fullPage if true, it will render a full page, otherwise only a part
* defaults to true
*/
- protected function render($template, $arguments=array(), $safeParams=array(),
+ protected function render($template, $arguments=array(), $safeParams=array(),
$fullPage=true){
-
+
if($fullPage){
$template = new \OCP\Template('news', $template, 'user');
} else {
$template = new \OCP\Template('news', $template);
}
-
+
foreach($arguments as $key => $value){
if(array_key_exists($key, $safeParams)) {
- $template->assign($key, $value, false);
+ $template->assign($key, $value, false);
} else {
$template->assign($key, $value);
}
-
+
}
$template->assign('userId', $this->userId);
@@ -98,5 +98,3 @@ class Controller {
}
-
-?> \ No newline at end of file