Add email notifications

This commit is contained in:
Frédéric Guillot
2014-08-15 17:23:41 -07:00
parent c539bdc8ab
commit 9eeded33f6
240 changed files with 23410 additions and 308 deletions

View File

@@ -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,