function cmis_browser_content_delete_confirm in CMIS API 6.2
Same name and namespace in other branches
- 6.4 cmis_browser/cmis_browser.content_delete.inc \cmis_browser_content_delete_confirm()
- 6.3 cmis_browser/cmis_browser.content_delete.inc \cmis_browser_content_delete_confirm()
- 7.2 cmis_browser/cmis_browser.content_delete.inc \cmis_browser_content_delete_confirm()
- 7 cmis_browser/cmis_browser.content_delete.inc \cmis_browser_content_delete_confirm()
Menu callback -- ask for confirmation of CMIS object deletion
1 string reference to 'cmis_browser_content_delete_confirm'
- cmis_browser_menu in cmis_browser/
cmis_browser.module - Implementation of hook_menu().
File
- cmis_browser/
cmis_browser.content_delete.inc, line 7
Code
function cmis_browser_content_delete_confirm(&$form_state) {
module_load_include('api.inc', 'cmis');
$cmis_objectId = urldecode($_GET['id']);
$form['cmis_objectId'] = array(
'#type' => 'value',
'#value' => $cmis_objectId,
);
$form['return_url'] = array(
'#type' => 'value',
'#value' => $_GET['return_url'],
);
try {
$repository = cmisapi_getRepositoryInfo();
$cmis_object = cmisapi_getProperties($repository->repositoryId, $cmis_objectId);
} catch (CMISException $e) {
cmis_error_handler('cmis_content_delete', $e);
}
return confirm_form($form, t('Are you sure you want to delete %title?', array(
'%title' => $cmis_object->title,
)), $_GET['return_url'], t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}