Models refactoring/improvements

This commit is contained in:
Frédéric Guillot
2014-09-20 14:49:31 +02:00
parent 00cdc609d1
commit 41e796c52a
14 changed files with 312 additions and 128 deletions

View File

@@ -269,7 +269,7 @@ abstract class Base
*/
protected function getTask()
{
$task = $this->task->getById($this->request->getIntegerParam('task_id'), true);
$task = $this->task->getDetails($this->request->getIntegerParam('task_id'));
if (! $task) {
$this->notfound();

View File

@@ -60,7 +60,7 @@ class Task extends Base
$this->forbidden(true);
}
$task = $this->task->getById($this->request->getIntegerParam('task_id'), true);
$task = $this->task->getDetails($this->request->getIntegerParam('task_id'));
if (! $task) {
$this->notfound(true);

View File

@@ -353,7 +353,7 @@ class User extends Base
$this->response->html($this->layout('user_edit', array(
'values' => $values,
'errors' => $errors,
'projects' => $this->projectPermission->getAllowedProjects($user['id']),
'projects' => $this->projectPermission->filterProjects($this->project->getList(), $user['id']),
'user' => $user,
)));
}