system_update_6041
modules/system/system.install, строка 2315
- Версии
- 6
system_update_6041()
Change forum vocabulary not to be required by default and set the weight of the forum.module 1 higher than the taxonomy.module.
Связанные темы
Код
<?php
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;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии