array( 'arguments' => array('form' => NULL), 'file' => 'cck_referential_integrity.admin.inc', ), 'cck_referential_integrity_status_icon' => array( 'arguments' => array('status' => NULL, 'title' => NULL), 'file' => 'cck_referential_integrity.admin.inc', ), ); } /** * Implementation of hook_perm(). */ function cck_referential_integrity_perm() { return array('administer referential integrity'); } /** * Implementation of hook_menu(). */ function cck_referential_integrity_menu() { $items = array(); $items['admin/content/node/orphan-references'] = array( 'title' => 'Orphan references', 'description' => 'Referential integrity report to monitor orphan records in node and user reference related tables.', 'page callback' => 'cck_referential_integrity_orphan_references', 'access arguments' => array('administer referential integrity'), 'file' => 'cck_referential_integrity.admin.inc', 'type' => MENU_LOCAL_TASK, 'weight' => 10, ); return $items; } /** * Implementation of hook_form_alter(). */ function cck_referential_integrity_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'content_field_edit_form' && isset($form['#field']) && isset($form['#field']['type'])) { module_load_include('inc', 'cck_referential_integrity'); module_load_include('inc', 'cck_referential_integrity', 'cck_referential_integrity.admin'); _cck_referential_integrity_content_field_edit_form_alter($form, $form_state, $form_id); } } /** * Implementation of hook_nodeapi(). */ function cck_referential_integrity_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { if ($op == 'delete') { module_load_include('inc', 'cck_referential_integrity'); cck_referential_integrity_apply('nodereference', $node->nid); } } /** * Implementation of hook_user(). */ function cck_referential_integrity_user($op, &$edit, &$account, $category = NULL) { if ($op == 'delete') { module_load_include('inc', 'cck_referential_integrity'); cck_referential_integrity_apply('userreference', $account->uid); } }