contrib modules security updates
This commit is contained in:
@@ -14,6 +14,13 @@ function views_bulk_operations_delete_action_info() {
|
||||
'behavior' => array('deletes_property'),
|
||||
'triggers' => array('any'),
|
||||
),
|
||||
'views_bulk_operations_delete_revision' => array(
|
||||
'type' => 'entity',
|
||||
'label' => t('Delete revision'),
|
||||
'configurable' => FALSE,
|
||||
'behavior' => array('deletes_property'),
|
||||
'triggers' => array('any'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -23,3 +30,9 @@ function views_bulk_operations_delete_item($entity, $context) {
|
||||
|
||||
entity_delete($context['entity_type'], $entity_id);
|
||||
}
|
||||
|
||||
function views_bulk_operations_delete_revision($entity, $context) {
|
||||
$info = entity_get_info($context['entity_type']);
|
||||
$revision_id = $entity->{$info['entity keys']['revision']};
|
||||
entity_revision_delete($context['entity_type'], $revision_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user