summaryrefslogtreecommitdiff
path: root/modules/blogapi/blogapi.module
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2008-01-18 19:03:15 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2008-01-18 19:03:15 +0000
commit0516192b54949f1aabcde51e381aeeacecd118b5 (patch)
treeb03b03dfd98bb893d9589fd4c6cc9e72a9f8363c /modules/blogapi/blogapi.module
parent1f9f8d9c860d9178cc4f4689329e15a6b40d0137 (diff)
downloadbrdo-0516192b54949f1aabcde51e381aeeacecd118b5.tar.gz
brdo-0516192b54949f1aabcde51e381aeeacecd118b5.tar.bz2
#211067 by webchick: blogapi_mt_get_post_categories() not using taxonomy_node_get_terms() properly
Diffstat (limited to 'modules/blogapi/blogapi.module')
-rw-r--r--modules/blogapi/blogapi.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index a4090d4a2..cbe316249 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;
}