diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-16 18:08:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-16 18:08:58 +0000 |
commit | 93d496bad8f8c9be9eb3a88e9c0c342bf3b6b184 (patch) | |
tree | 084a01c746870aa765771c47a954dbba9b577859 /modules/blogapi | |
parent | 2132883524c45b72de950636688f0859aec043ad (diff) | |
download | brdo-93d496bad8f8c9be9eb3a88e9c0c342bf3b6b184.tar.gz brdo-93d496bad8f8c9be9eb3a88e9c0c342bf3b6b184.tar.bz2 |
- Patch #41276 by walkah/chx: blog api fixes for new forms api.
Diffstat (limited to 'modules/blogapi')
-rw-r--r-- | modules/blogapi/blogapi.module | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index fd2ddddef..8b284b241 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -214,8 +214,7 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte $edit['body'] = $content; } - $node = node_validate($edit); - + node_validate($edit); if ($errors = form_get_errors()) { return blogapi_error(implode("\n", $errors)); } @@ -224,6 +223,7 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte return blogapi_error(t('You do not have permission to create the type of post you wanted to create.')); } + $node = node_submit($edit); node_save($node); if ($node->nid) { watchdog('content', t('%type: added %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid")); @@ -269,8 +269,7 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont $node->body = $content; } - $node = node_validate($node); - + node_validate($node); if ($errors = form_get_errors()) { return blogapi_error(implode("\n", $errors)); } @@ -279,6 +278,8 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont foreach ($terms as $term) { $node->taxonomy[] = $term->tid; } + + $node = node_submit($node); node_save($node); if ($node->nid) { watchdog('content', t('%type: updated %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid")); |