Merge pull request #732 from jcwacky/3.0

BUGFIX: GridField delete icon now correctly deletes, rather than always ...
This commit is contained in:
Sam Minnée 2012-08-21 15:40:43 -07:00
commit a45f4a4c29

View File

@ -133,7 +133,11 @@ class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_Actio
if($actionName == 'deleterecord' && !$item->canDelete()) {
throw new ValidationException(_t('GridFieldAction_Delete.DeletePermissionsFailure',"No delete permissions"),0);
}
if($actionName == 'deleterecord') {
$item->delete();
} else {
$gridField->getList()->remove($item);
}
}
}
}