function nodewords_update_6136 in Nodewords: D6 Meta Tags 6
Same name and namespace in other branches
- 6.2 nodewords.install \nodewords_update_6136()
Implements hook_update_N().
File
- ./
nodewords.install, line 748 - Installation file for nodewords.module.
Code
function nodewords_update_6136() {
$ret = array();
if (module_exists('nodewords')) {
$tags = array(
'nodewords_basic' => array(
'abstract',
'canonical',
'copyright',
'description',
'keywords',
'revisit-after',
'robots',
),
'nodewords_extra' => array(
'dc.contributor',
'dc.creator',
'dc.date',
'dc.publisher',
'dc.title',
'geourl',
'location',
'pics-label',
),
'nodewords_verification_tags' => array(
'bing_webmaster_center',
'google_webmaster_tools',
'yahoo_site_explorer',
),
);
foreach ($tags as $module => $module_tags) {
$bool = db_result(db_query("SELECT COUNT(*) FROM {nodewords} WHERE name IN (" . db_placeholders($module_tags, 'varchar') . ")", $module_tags));
if ($bool) {
module_enable(array(
$module,
));
$ret[] = array(
'success' => TRUE,
'query' => "UPDATE {system} SET status = 1 WHERE type = 'module' AND name = '{$module}'",
);
}
}
}
return $ret;
}