function comment_ip_redirect in Comment IP 7
Redirect the menu callback to specific forms based on posted data.
1 string reference to 'comment_ip_redirect'
- comment_ip_menu_alter in ./
comment_ip.module - Implements hook_menu_alter().
File
- ./
comment_ip.module, line 65 - Main hooks and functions for comment_ip module.
Code
function comment_ip_redirect($type = 'new') {
$edit = $_POST;
// Standard comment delete form.
if (isset($edit['operation']) && $edit['operation'] == 'delete' && isset($edit['comments']) && $edit['comments']) {
return drupal_get_form('comment_multiple_delete_confirm');
}
elseif (isset($edit['operation']) && $edit['operation'] == 'block' && isset($edit['comments']) && $edit['comments']) {
return drupal_get_form('comment_ip_confirm_blocked_ips');
}
else {
// Default admin overview form.
return drupal_get_form('comment_admin_overview', $type);
}
}