function _resource_conflict_disable in Resource Conflict 6.2
Same name and namespace in other branches
- 5.2 resource_conflict.module \_resource_conflict_disable()
- 7.2 resource_conflict.module \_resource_conflict_disable()
Disable resource conflict for a type, optionally notifying the user. A message is always logged in the Drupal log. If the content type is not conflict-enabled, nothing is changed.
Parameters
$type: The content type to disable.
$display: If TRUE, display the message with drupal_set_message().
2 calls to _resource_conflict_disable()
- resource_conflict_form_alter in ./
resource_conflict.module - Implementation of hook_form_alter
- resource_conflict_nodeapi in ./
resource_conflict.module - Implementation of hook_nodeapi
File
- ./
resource_conflict.module, line 434
Code
function _resource_conflict_disable($type, $display = FALSE) {
// If the requirements are no longer met, disable resource checking and
// alert the site administrator.
if (variable_get('rc_type_' . $type, FALSE)) {
variable_del('rc_type_' . $type);
$msg = t('Resource Conflict has been disabled for the %type content type as the requirements for it are no longer met.', array(
'%type' => $type,
));
if ($display) {
drupal_set_message($msg, 'Resource Conflict');
}
watchdog('rsrc conflict', $msg, WATCHDOG_WARNING);
}
}