aboutsummaryrefslogtreecommitdiff
path: root/mod/blog
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog')
-rw-r--r--mod/blog/blog_lib.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/mod/blog/blog_lib.php b/mod/blog/blog_lib.php
index de7cc1b96..4d330c295 100644
--- a/mod/blog/blog_lib.php
+++ b/mod/blog/blog_lib.php
@@ -307,13 +307,17 @@ class ElggBlog extends ElggObject {
}
/**
- * Override the value returned for time_created
+ * Rewrite the time created to be publish time.
+ * This is a bit dirty, but required for proper sorting.
*/
- public function __get($name) {
- if ($name == 'time_created') {
- $name = 'time_created';
+ public function save() {
+ if (parent::save()) {
+ global $CONFIG;
+ $published = $this->publish_date;
+ $sql = "UPDATE {$CONFIG->dbprefix}entities SET time_created = '$published', time_updated = '$published'";
+ return update_data($sql);
}
- return $this->get($name);
+ return FALSE;
}
} \ No newline at end of file