diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-29 18:25:51 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-29 18:25:51 +0000 |
commit | 94c1729eacb262598aa75fda35049b344051012b (patch) | |
tree | fb722b013abe7fcb87a1185d5dc89c85ff232faf /modules | |
parent | 48002ab0b422f49885d638522060b834cc692211 (diff) | |
download | brdo-94c1729eacb262598aa75fda35049b344051012b.tar.gz brdo-94c1729eacb262598aa75fda35049b344051012b.tar.bz2 |
#161107 by fwalch and bragon: actually implement the missing forum_term_load to work behind the %forum_term menu item resolving calls
Diffstat (limited to 'modules')
-rw-r--r-- | modules/forum/forum.module | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 9701ec266..bf505fc6f 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -61,6 +61,20 @@ function forum_theme() { } /** + * Fetch a forum term. + * + * @param $tid + * The ID of the term which should be loaded. + * + * @return + * An associative array containing the term data or FALSE if the term cannot be loaded, or is not part of the forum vocabulary. + */ +function forum_term_load($tid) { + $result = db_query(db_rewrite_sql('SELECT t.tid, t.vid, t.name, t.description, t.weight FROM {term_data} t WHERE t.tid = %d AND t.vid = %d', 't', 'tid'), $tid, variable_get('forum_nav_vocabulary', '')); + return db_fetch_array($result); +} + +/** * Implementation of hook_menu(). */ function forum_menu() { |