diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-30 14:17:12 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-30 14:17:12 +0000 |
commit | 2347d3f93c19b7627589ff1859916ead450cb25c (patch) | |
tree | fc4c90cee23bfe09915f7b77b6f0cc7168518398 /modules/blogapi | |
parent | 6ad023451adb317c7e0c20d4ef70b957a6da3ba6 (diff) | |
download | brdo-2347d3f93c19b7627589ff1859916ead450cb25c.tar.gz brdo-2347d3f93c19b7627589ff1859916ead450cb25c.tar.bz2 |
#53834, validation was broken in blogapi, patch by samc
Diffstat (limited to 'modules/blogapi')
-rw-r--r-- | modules/blogapi/blogapi.module | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 71d518f90..71c6cac05 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -214,11 +214,6 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte $edit['body'] = $content; } - node_validate($edit); - if ($errors = form_get_errors()) { - return blogapi_error(implode("\n", $errors)); - } - if (!node_access('create', $node)) { return blogapi_error(t('You do not have permission to create the type of post you wanted to create.')); } @@ -226,6 +221,12 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte if (user_access('administer nodes') && !isset($edit['date'])) { $edit['date'] = format_date(time(), 'custom', 'Y-m-d H:i:s O'); } + + node_validate($edit); + if ($errors = form_get_errors()) { + return blogapi_error(implode("\n", $errors)); + } + $node = node_submit($edit); node_save($node); if ($node->nid) { |