Acl refactoring

This commit is contained in:
Frédéric Guillot
2014-12-31 12:37:15 -05:00
parent 66f150d887
commit 772804add8
93 changed files with 943 additions and 626 deletions

View File

@@ -36,7 +36,7 @@ class Category extends Base
*/
public function index(array $values = array(), array $errors = array())
{
$project = $this->getProjectManagement();
$project = $this->getProject();
$this->response->html($this->projectLayout('category/index', array(
'categories' => $this->category->getList($project['id'], false),
@@ -54,7 +54,7 @@ class Category extends Base
*/
public function save()
{
$project = $this->getProjectManagement();
$project = $this->getProject();
$values = $this->request->getValues();
list($valid, $errors) = $this->category->validateCreation($values);
@@ -80,7 +80,7 @@ class Category extends Base
*/
public function edit(array $values = array(), array $errors = array())
{
$project = $this->getProjectManagement();
$project = $this->getProject();
$category = $this->getCategory($project['id']);
$this->response->html($this->projectLayout('category/edit', array(
@@ -98,7 +98,7 @@ class Category extends Base
*/
public function update()
{
$project = $this->getProjectManagement();
$project = $this->getProject();
$values = $this->request->getValues();
list($valid, $errors) = $this->category->validateModification($values);
@@ -124,7 +124,7 @@ class Category extends Base
*/
public function confirm()
{
$project = $this->getProjectManagement();
$project = $this->getProject();
$category = $this->getCategory($project['id']);
$this->response->html($this->projectLayout('category/remove', array(
@@ -142,7 +142,7 @@ class Category extends Base
public function remove()
{
$this->checkCSRFParam();
$project = $this->getProjectManagement();
$project = $this->getProject();
$category = $this->getCategory($project['id']);
if ($this->category->remove($category['id'])) {