diff --git a/core/modules/ban/ban.module b/core/modules/ban/ban.module index 12405ba1c9acb2ac1cf3b2eae266381c11f1a074..9e9ed0f5c57d46e052f50a8f69a42af5a11ce307 100644 --- a/core/modules/ban/ban.module +++ b/core/modules/ban/ban.module @@ -71,30 +71,3 @@ function ban_menu() { function ban_ip_load($iid) { return db_query("SELECT * FROM {ban_ip} WHERE iid = :iid", array(':iid' => $iid))->fetchAssoc(); } - -/** - * Implements hook_action_info(). - */ -function ban_action_info() { - return array( - 'ban_ip_action' => array( - 'type' => 'user', - 'label' => t('Ban IP address of current user'), - 'configurable' => FALSE, - 'triggers' => array('any'), - ), - ); -} - -/** - * Bans the current user's IP address. - * - * @ingroup actions - */ -function ban_ip_action() { - $ip = ip_address(); - db_insert('ban_ip') - ->fields(array('ip' => $ip)) - ->execute(); - watchdog('action', 'Banned IP address %ip', array('%ip' => $ip)); -} diff --git a/core/modules/system/system.install b/core/modules/system/system.install index e29674e683602a7b9ef21b016c16f5c1cd90e94a..9157635c83975d55ee07025321336e030d83eb1a 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1934,14 +1934,11 @@ function system_update_8020() { ->execute(); // Rename {blocked_ips} table into {ban_ip}. db_rename_table('blocked_ips', 'ban_ip'); - // Rename all references to the action callback. - db_update('actions') - ->fields(array('callback' => 'ban_ip_action')) + // Remove all references to the removed action callback. + db_delete('actions') ->condition('callback', 'system_block_ip_action') ->execute(); - // Rename the action's aid. - db_update('actions') - ->fields(array('aid' => 'ban_ip_action')) + db_delete('actions') ->condition('aid', 'system_block_ip_action') ->execute(); // Enable the new Ban module.