function system_update_6041 in Drupal 6
Change forum vocabulary not to be required by default and set the weight of the forum.module 1 higher than the taxonomy.module.
Related topics
File
- modules/
system/ system.install, line 2390
Code
function system_update_6041() {
$weight = intval(db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'")) + 1);
$ret = array();
$vid = intval(variable_get('forum_nav_vocabulary', ''));
if (db_table_exists('vocabulary') && $vid) {
$ret[] = update_sql("UPDATE {vocabulary} SET required = 0 WHERE vid = " . $vid);
$ret[] = update_sql("UPDATE {system} SET weight = " . $weight . " WHERE name = 'forum'");
}
return $ret;
}