function document_delete_doc in Document 7
Same name and namespace in other branches
- 6 document.callback.inc \document_delete_doc()
- 8.x document.callback.inc \document_delete_doc()
1 string reference to 'document_delete_doc'
- document_menu in ./
document.module - Implementation of hook_menu().
File
- ./
document.callback.inc, line 66
Code
function document_delete_doc() {
try {
_document_headers();
_document_validate_token();
$ids = $_REQUEST['ids'];
if (!isset($ids)) {
die(t('Invalid input.'));
}
$ids = explode(',', $ids);
foreach ($ids as $id) {
node_delete($id);
}
die;
} catch (Exception $e) {
die($e
->getMessage() + "\n" + $e
->getTraceAsString());
}
}