diff options
Diffstat (limited to 'mod/blog/actions')
-rw-r--r-- | mod/blog/actions/blog/auto_save_revision.php | 2 | ||||
-rw-r--r-- | mod/blog/actions/blog/save.php | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mod/blog/actions/blog/auto_save_revision.php b/mod/blog/actions/blog/auto_save_revision.php index fa9010e90..a67939e9f 100644 --- a/mod/blog/actions/blog/auto_save_revision.php +++ b/mod/blog/actions/blog/auto_save_revision.php @@ -33,7 +33,7 @@ if ($title && $description) { $error = elgg_echo('blog:error:post_not_found'); } } else { - $blog = new ElggObject(); + $blog = new ElggBlog(); $blog->subtype = 'blog'; // force draft and private for autosaves. diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php index 0ca063496..eca711f60 100644 --- a/mod/blog/actions/blog/save.php +++ b/mod/blog/actions/blog/save.php @@ -34,7 +34,7 @@ if ($guid) { $revision_value = $blog->description; $new_post = FALSE; } else { - $blog = new ElggObject(); + $blog = new ElggBlog(); $blog->subtype = 'blog'; $success_forward_url = get_input('forward'); $new_post = TRUE; @@ -100,9 +100,10 @@ foreach ($values as $name => $default) { break; case 'publish_date': - if (empty($value)) { + if (!$value = strtotime($value)) { $value = time(); } + $values[$name] = $value; break; |