aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/actions
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-23 19:25:14 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-23 19:25:14 +0000
commitb3e6ac6960e56001d80243f694fe2109211a5fce (patch)
treef8dfebc35a3fabda7a615b389b8758b88358f63b /mod/blog/actions
parentc71f11c1b7a4a2ee634acd50582e5202da5389cc (diff)
downloadelgg-b3e6ac6960e56001d80243f694fe2109211a5fce.tar.gz
elgg-b3e6ac6960e56001d80243f694fe2109211a5fce.tar.bz2
Added an ElggBlog class to override the time_created field.
Added extra language files. git-svn-id: http://code.elgg.org/elgg/trunk@5486 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/actions')
-rw-r--r--mod/blog/actions/blog/auto_save_revision.php2
-rw-r--r--mod/blog/actions/blog/save.php5
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;