aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/actions/blog/save.php
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/blog/save.php
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/blog/save.php')
-rw-r--r--mod/blog/actions/blog/save.php5
1 files changed, 3 insertions, 2 deletions
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;