diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-12 10:02:45 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-12 10:02:45 +0000 |
commit | 6e45b2f9c30f0e190c4746656667208d86a37bd8 (patch) | |
tree | 0a0b341ba6f45c356934de7414f6c89c7f4f6376 /modules/blogapi.module | |
parent | 47ae354ef5b266a0df8a557c078ee866f4c352ee (diff) | |
download | brdo-6e45b2f9c30f0e190c4746656667208d86a37bd8.tar.gz brdo-6e45b2f9c30f0e190c4746656667208d86a37bd8.tar.bz2 |
- Patch #42029 by drumm: correct post times for administrators posting using a blogapi client.
Diffstat (limited to 'modules/blogapi.module')
-rw-r--r-- | modules/blogapi.module | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/blogapi.module b/modules/blogapi.module index ce7edce8d..bb187084e 100644 --- a/modules/blogapi.module +++ b/modules/blogapi.module @@ -223,6 +223,9 @@ 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.')); } + if (user_access('administer nodes') && !isset($edit['date'])) { + $edit['date'] = format_date(time(), 'custom', 'Y-m-d H:i:s O'); + } $node = node_submit($edit); node_save($node); if ($node->nid) { @@ -274,6 +277,9 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont return blogapi_error(implode("\n", $errors)); } + if (user_access('administer nodes') && !isset($edit['date'])) { + $node->date = format_date($node->created, 'custom', 'Y-m-d H:i:s O'); + } $node = node_submit($node); node_save($node); if ($node->nid) { |