From 0516192b54949f1aabcde51e381aeeacecd118b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu> Date: Fri, 18 Jan 2008 19:03:15 +0000 Subject: [PATCH] #211067 by webchick: blogapi_mt_get_post_categories() not using taxonomy_node_get_terms() properly --- modules/blogapi/blogapi.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index a4090d4a23b7..cbe3162499cb 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -421,7 +421,8 @@ function blogapi_mt_get_post_categories($postid, $username, $password) { return blogapi_error($user); } - $terms = module_invoke('taxonomy', 'node_get_terms', $postid, 'tid'); + $node = node_load($postid); + $terms = module_invoke('taxonomy', 'node_get_terms', $node, 'tid'); $categories = array(); foreach ($terms as $term) { $term_name = $term->name; @@ -430,6 +431,7 @@ function blogapi_mt_get_post_categories($postid, $username, $password) { } $categories[] = array('categoryName' => $term_name, 'categoryId' => $term->tid, 'isPrimary' => TRUE); } + return $categories; } -- GitLab