Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0516192b
Commit
0516192b
authored
Jan 18, 2008
by
Gábor Hojtsy
Browse files
#211067
by webchick: blogapi_mt_get_post_categories() not using taxonomy_node_get_terms() properly
parent
1f9f8d9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/blogapi/blogapi.module
View file @
0516192b
...
@@ -421,7 +421,8 @@ function blogapi_mt_get_post_categories($postid, $username, $password) {
...
@@ -421,7 +421,8 @@ function blogapi_mt_get_post_categories($postid, $username, $password) {
return
blogapi_error
(
$user
);
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
();
$categories
=
array
();
foreach
(
$terms
as
$term
)
{
foreach
(
$terms
as
$term
)
{
$term_name
=
$term
->
name
;
$term_name
=
$term
->
name
;
...
@@ -430,6 +431,7 @@ function blogapi_mt_get_post_categories($postid, $username, $password) {
...
@@ -430,6 +431,7 @@ function blogapi_mt_get_post_categories($postid, $username, $password) {
}
}
$categories
[]
=
array
(
'categoryName'
=>
$term_name
,
'categoryId'
=>
$term
->
tid
,
'isPrimary'
=>
TRUE
);
$categories
[]
=
array
(
'categoryName'
=>
$term_name
,
'categoryId'
=>
$term
->
tid
,
'isPrimary'
=>
TRUE
);
}
}
return
$categories
;
return
$categories
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment