diff options
Diffstat (limited to 'app/Controller/Config.php')
-rw-r--r-- | app/Controller/Config.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/Controller/Config.php b/app/Controller/Config.php index daa57790..498f3214 100644 --- a/app/Controller/Config.php +++ b/app/Controller/Config.php @@ -20,7 +20,8 @@ class Config extends Base $this->response->html($this->template->layout('config_index', array( 'db_size' => $this->config->getDatabaseSize(), 'user' => $_SESSION['user'], - 'projects' => $this->project->getList(), + 'user_projects' => $this->project->getAvailableList($this->acl->getUserId()), + 'notifications' => $this->notification->readSettings($this->acl->getUserId()), 'languages' => $this->config->getLanguages(), 'values' => $this->config->getAll(), 'errors' => array(), @@ -32,6 +33,13 @@ class Config extends Base ))); } + public function notifications() + { + $values = $this->request->getValues(); + $this->notification->saveSettings($this->acl->getUserId(), $values); + $this->response->redirect('?controller=config#notifications'); + } + /** * Validate and save settings * @@ -57,7 +65,8 @@ class Config extends Base $this->response->html($this->template->layout('config_index', array( 'db_size' => $this->config->getDatabaseSize(), 'user' => $_SESSION['user'], - 'projects' => $this->project->getList(), + 'user_projects' => $this->project->getAvailableList($this->acl->getUserId()), + 'notifications' => $this->notification->readSettings($this->acl->getUserId()), 'languages' => $this->config->getLanguages(), 'values' => $values, 'errors' => $errors, |