diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-09-19 20:25:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-09-19 20:25:03 +0000 |
commit | fa8abcbf3b5b26cd1ef3e61a28c2bbf6d9d9793f (patch) | |
tree | 52b5959e0fa775346e2243e995db94e113181c5b /modules/forum | |
parent | 1ec9a7b7a6ae3801e7cd0147519aa04be992ad8a (diff) | |
download | brdo-fa8abcbf3b5b26cd1ef3e61a28c2bbf6d9d9793f.tar.gz brdo-fa8abcbf3b5b26cd1ef3e61a28c2bbf6d9d9793f.tar.bz2 |
- Patch #305740 by catch, Benjamin Melançon: added an edit tab to taxonomy term pages.
Diffstat (limited to 'modules/forum')
-rw-r--r-- | modules/forum/forum.admin.inc | 2 | ||||
-rw-r--r-- | modules/forum/forum.module | 4 | ||||
-rw-r--r-- | modules/forum/forum.test | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/forum/forum.admin.inc b/modules/forum/forum.admin.inc index a16bff5ef..d39ad3278 100644 --- a/modules/forum/forum.admin.inc +++ b/modules/forum/forum.admin.inc @@ -160,7 +160,7 @@ function forum_form_container(&$form_state, $edit = array()) { * @param $tid ID of the term to be deleted */ function forum_confirm_delete(&$form_state, $tid) { - $term = taxonomy_get_term($tid); + $term = taxonomy_term_load($tid); $form['tid'] = array('#type' => 'value', '#value' => $tid); $form['name'] = array('#type' => 'value', '#value' => $term->name); diff --git a/modules/forum/forum.module b/modules/forum/forum.module index e550bddcc..1588a1b4c 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -224,7 +224,7 @@ function forum_nodeapi(&$node, $op, $teaser, $page) { foreach ($node->taxonomy as $term) { if (db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d', $term, $vocabulary))) { if (in_array($term, $containers)) { - $term = taxonomy_get_term($term); + $term = taxonomy_term_load($term); form_set_error('taxonomy', t('The item %forum is only a container for forums. Please select one of the forums below it.', array('%forum' => $term->name))); } } @@ -565,7 +565,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) { } } - $term = taxonomy_get_term($tid); + $term = taxonomy_term_load($tid); $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.type, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d"); $sql .= tablesort_sql($forum_topic_list_header, 'n.sticky DESC,'); diff --git a/modules/forum/forum.test b/modules/forum/forum.test index ccb74dbf8..92f174eac 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -134,7 +134,7 @@ class ForumTestCase extends DrupalWebTestCase { ); // Edit the vocabulary. - $this->drupalPost('admin/content/taxonomy/edit/vocabulary/' . $vid, $edit, t('Save')); + $this->drupalPost('admin/content/taxonomy/' . $vid . '/edit', $edit, t('Save')); $this->assertResponse(200); $this->assertRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary was edited')); @@ -158,7 +158,7 @@ class ForumTestCase extends DrupalWebTestCase { ); // Edit the vocabulary. - $this->drupalPost('admin/content/taxonomy/edit/vocabulary/' . $vid, $edit, t('Save')); + $this->drupalPost('admin/content/taxonomy/' . $vid . 'edit', $edit, t('Save')); $this->assertResponse(200); $this->assertRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary was edited')); /* |