Commit 1d09fc48 authored by Dries's avatar Dries

- Patch #7163 by walkah: blogapi mt.getCategoryList should return an empty...

- Patch #7163 by walkah: blogapi mt.getCategoryList should return an empty array by default.  Reported by Adriaan.
parent dd2c05b1
......@@ -230,8 +230,8 @@ function blogapi_new_media_object($req_params) {
function blogapi_get_category_list($req_params) {
$vocabularies = module_invoke('taxonomy', 'get_vocabularies', 'blog', 'vid');
$categories = array();
if ($vocabularies) {
$categories = array();
foreach ($vocabularies as $vocabulary) {
$terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, -1, 'tid');
foreach ($terms as $term) {
......@@ -244,11 +244,8 @@ function blogapi_get_category_list($req_params) {
'struct');
}
}
return new xmlrpcresp(new xmlrpcval($categories, "array"));
}
else {
return blogapi_error('no categories');
}
return new xmlrpcresp(new xmlrpcval($categories, "array"));
}
function blogapi_get_post_categories($req_params) {
......
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