From 6e45b2f9c30f0e190c4746656667208d86a37bd8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 12 Jan 2006 10:02:45 +0000 Subject: - Patch #42029 by drumm: correct post times for administrators posting using a blogapi client. --- modules/blogapi/blogapi.module | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/blogapi') diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index ce7edce8d..bb187084e 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/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) { -- cgit v1.2.3