spam_filter_url.install in Spam 6
URL filter module install
Provides a URL filter for use with other modules. Defines hooks for use with the Spam API.
File
filters/spam_filter_url/spam_filter_url.installView source
<?php
/**
* @file
* URL filter module install
*
* Provides a URL filter for use with other modules.
* Defines hooks for use with the Spam API.
*/
/**
* Fix variable namespacing.
*/
function spam_filter_url_update_6101() {
$ret = array();
$old_vars = array(
'url_limit_repeat',
'url_limit_total',
'url_spam_filter',
);
foreach ($old_vars as $var) {
$test = variable_get($var, null);
if (!empty($test) && !strcmp(substr($var, 0, 12), "spam_filter_")) {
$ret[] = update_sql('UPDATE {variables} SET name = %s WHERE name = %s', 'spam_filter_' . $var, $var);
}
}
return $ret;
}
Functions
Name | Description |
---|---|
spam_filter_url_update_6101 | Fix variable namespacing. |