|
Revision 13490, 425 bytes
(checked in by fabien, 5 years ago)
|
[1.2] fixed CSRF problem with CRUD and admin generator (closes #4915)
|
| Line | |
|---|
| 1 |
public function executeDelete(sfWebRequest $request) |
|---|
| 2 |
{ |
|---|
| 3 |
$request->checkCSRFProtection(); |
|---|
| 4 |
|
|---|
| 5 |
$this->dispatcher->notify(new sfEvent($this, 'admin.delete_object', array('object' => $this->getRoute()->getObject()))); |
|---|
| 6 |
|
|---|
| 7 |
$this->getRoute()->getObject()->delete(); |
|---|
| 8 |
|
|---|
| 9 |
$this->getUser()->setFlash('notice', 'The item was deleted successfully.'); |
|---|
| 10 |
|
|---|
| 11 |
$this->redirect('@<?php echo $this->getUrlForAction('list') ?>'); |
|---|
| 12 |
} |
|---|
| 13 |
|
|---|