Commit 16051d46 authored by Dries's avatar Dries

- Patch 42210 by Neil: Save whole node instead of saving taxonomy.

parent 4e350604
......@@ -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;
}
/**
......
......@@ -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;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment