function spam_init_filters in Spam 5.3
Same name and namespace in other branches
- 6 spam.module \spam_init_filters()
Check if any new spam filters are available for installation.
1 call to spam_init_filters()
- spam_admin_filter_overview in ./
spam.module - Spam filter overview page. Allows enabling/disabling, ordering, and tuning of individual filters, on a per-content-type-group basis. This allows you to enable different filters for different content types.
File
- ./
spam.module, line 906
Code
function spam_init_filters() {
static $initialized = FALSE;
if (!$initialized) {
$modules = spam_invoke_api('filter_module');
foreach ($modules as $module) {
$filter = spam_invoke_module($module, 'filter_info');
$fid = db_result(db_query("SELECT fid FROM {spam_filters} WHERE name = '%s' AND module = '%s' LIMIT 1", $filter['name'], $filter['module']));
if (!$fid) {
spam_install_filter($filter);
}
}
}
}