summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-11-08 20:07:48 +0000
committerDries Buytaert <dries@buytaert.net>2006-11-08 20:07:48 +0000
commitb245ff5b42e6ae2750e02bbc5fe741a64843c17d (patch)
treec68f847653fe59d37b1a2690e73d03f3dbb5637c
parent01191f7230c82b63fac3d23b31d8c4b31131ec03 (diff)
downloadbrdo-b245ff5b42e6ae2750e02bbc5fe741a64843c17d.tar.gz
brdo-b245ff5b42e6ae2750e02bbc5fe741a64843c17d.tar.bz2
- Patch #12984 by walkah: blogapi fixes.
-rw-r--r--modules/blogapi/blogapi.module11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index de6bb7fd8..ff6c95838 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -328,7 +328,7 @@ function blogapi_blogger_get_recent_posts($appkey, $blogid, $username, $password
$type = _blogapi_blogid($blogid);
if ($bodies) {
- $result = db_query_range("SELECT n.nid, n.title, r.body, n.created, u.name FROM {node} n, {node_revisions} r, {users} u WHERE n.uid = u.uid AND n.vid = r.vid AND n.type = '%s' AND n.uid = %d ORDER BY n.created DESC", $type, $user->uid, 0, $number_of_posts);
+ $result = db_query_range("SELECT n.nid, n.title, r.body, r.format, n.comment, n.created, u.name FROM {node} n, {node_revisions} r, {users} u WHERE n.uid = u.uid AND n.vid = r.vid AND n.type = '%s' AND n.uid = %d ORDER BY n.created DESC", $type, $user->uid, 0, $number_of_posts);
}
else {
$result = db_query_range("SELECT n.nid, n.title, n.created, u.name FROM {node} n, {users} u WHERE n.uid = u.uid AND n.type = '%s' AND n.uid = %d ORDER BY n.created DESC", $type, $user->uid, 0, $number_of_posts);
@@ -681,18 +681,17 @@ function _blogapi_get_post($node, $bodies = TRUE) {
'link' => url('node/'.$node->nid, NULL, NULL, TRUE),
'permaLink' => url('node/'.$node->nid, NULL, NULL, TRUE),
);
- if ($bodies) {
- if ($node->comment = 1) {
+ if ($bodies) {
+ if ($node->comment == 1) {
$comment = 2;
}
- if ($node->comment = 2) {
+ else if ($node->comment == 2) {
$comment = 1;
}
-
$xmlrpcval['content'] = "<title>$node->title</title>$node->body";
$xmlrpcval['description'] = $node->body;
// Add MT specific fields
- $xmlrpcval['mt_allow_comments'] = $comment;
+ $xmlrpcval['mt_allow_comments'] = (int) $comment;
$xmlrpcval['mt_convert_breaks'] = $node->format;
}