From 16051d46a94f360db508fc1fce436fa718f70e20 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Sat, 31 Dec 2005 13:52:47 +0000 Subject: [PATCH] - Patch 42210 by Neil: Save whole node instead of saving taxonomy. --- modules/blogapi.module | 10 +++++----- modules/blogapi/blogapi.module | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/blogapi.module b/modules/blogapi.module index 2e5fef9bca01..8fa29326eb70 100644 --- a/modules/blogapi.module +++ b/modules/blogapi.module @@ -445,13 +445,13 @@ function blogapi_mt_set_post_categories($postid, $username, $password, $categori return blogapi_error($user); } - $nid = $postid; - $terms = array(); + $node = node_load($postid); + $node->taxonomy = array(); foreach ($categories as $category) { - $terms[] = $category['categoryId']; + $node->taxonomy[] = $category['categoryId']; } - module_invoke('taxonomy', 'node_save', $nid, $terms); - return true; + node_save($node); + return TRUE; } /** diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 2e5fef9bca01..8fa29326eb70 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -445,13 +445,13 @@ function blogapi_mt_set_post_categories($postid, $username, $password, $categori return blogapi_error($user); } - $nid = $postid; - $terms = array(); + $node = node_load($postid); + $node->taxonomy = array(); foreach ($categories as $category) { - $terms[] = $category['categoryId']; + $node->taxonomy[] = $category['categoryId']; } - module_invoke('taxonomy', 'node_save', $nid, $terms); - return true; + node_save($node); + return TRUE; } /** -- GitLab