diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-11 10:52:01 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-11 10:52:01 +0000 |
commit | b8264306fc751fa67e7fb55a4b86c9d5950ffbfb (patch) | |
tree | 01740243d9c984084abcb5c787b5e43b6764266f /modules/system | |
parent | c073e88c56909424ba3aa164b43d26374918cbb7 (diff) | |
download | brdo-b8264306fc751fa67e7fb55a4b86c9d5950ffbfb.tar.gz brdo-b8264306fc751fa67e7fb55a4b86c9d5950ffbfb.tar.bz2 |
#176282 by Desbeers: forum taxonomy was required for non-forum node types, when enabled for forum inclusion
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.install | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index c89294220..c25268c61 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2714,6 +2714,20 @@ function system_update_6040() { } /** + * Change forum vocabulary not to be required by default and set the weight of the forum.module 1 higher than the taxonomy.module. + */ +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; +} + +/** * @} End of "defgroup updates-5.x-to-6.x" * The next series of updates should start at 7000. */ |