mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
Make delete handler respect canDelete
(#142)
This commit is contained in:
parent
3aad957a69
commit
c7a275a7a6
@ -34,9 +34,11 @@ class GridFieldBulkActionDeleteHandler extends GridFieldBulkActionHandler
|
||||
$ids = array();
|
||||
|
||||
foreach ($this->getRecords() as $record) {
|
||||
if ($record->canDelete()) {
|
||||
array_push($ids, $record->ID);
|
||||
$record->delete();
|
||||
}
|
||||
}
|
||||
|
||||
$response = new SS_HTTPResponse(Convert::raw2json(array(
|
||||
'done' => true,
|
||||
|
Loading…
Reference in New Issue
Block a user