app/controllers/ControllerBase.php 1 location
|
@@ 126-134 (lines=9) @@
|
123 |
|
} |
124 |
|
|
125 |
|
|
126 |
|
public function deleteAction($id = null) |
127 |
|
{ |
128 |
|
if ($this->verifyAccessAction($this->controller, "write")) { |
129 |
|
$object = call_user_func($this->model . '::findFirst', "$id"); |
130 |
|
$object->delete(); |
131 |
|
} |
132 |
|
|
133 |
|
$this->response->redirect("$this->controller/index"); |
134 |
|
} |
135 |
|
|
136 |
|
public function asAdminAction() |
137 |
|
{ |
app/controllers/TachesController.php 1 location
|
@@ 37-45 (lines=9) @@
|
34 |
|
$this->useCaseUpdate($projet); |
35 |
|
} |
36 |
|
|
37 |
|
public function deleteAction($id = null) |
38 |
|
{ |
39 |
|
$object = call_user_func($this->model . '::findFirst', "$id"); |
40 |
|
$object->delete(); |
41 |
|
|
42 |
|
$this->useCaseUpdate($object); |
43 |
|
$this->response->redirect("$this->controller/index"); |
44 |
|
$this->response->redirect($_SERVER['HTTP_REFERER'] . "/2"); |
45 |
|
} |
46 |
|
|
47 |
|
public function useCaseUpdate($obj) |
48 |
|
{ |