function spambot_update_6302 in Spambot 6.3
File
- ./
spambot.install, line 73
Code
function spambot_update_6302() {
$ret = array();
variable_del('spambot_user_register_report');
$ret[] = array(
'success' => TRUE,
'query' => t('Deleted variable <em>spambot_user_register_report.</em>'),
);
$message = variable_get('spambot_blocked_message', FALSE);
if ($message !== FALSE) {
variable_set('spambot_blocked_message_email', $message);
variable_set('spambot_blocked_message_username', $message);
variable_set('spambot_blocked_message_ip', $message);
variable_del('spambot_blocked_message');
$ret[] = array(
'success' => TRUE,
'query' => t('Transferred user registration blocked message to new format.'),
);
}
// Create new table node_spambot
$schema = array();
$schema['node_spambot'] = array(
'description' => t('Node table to track author IP addresses. For use by spambot only.'),
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'hostname' => array(
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
),
),
'primary key' => array(
'nid',
),
'indexes' => array(
'uid' => array(
'uid',
),
),
);
db_create_table($ret, 'node_spambot', $schema['node_spambot']);
return $ret;
}