aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-11 22:05:52 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-11 22:05:52 +0000
commitb4a744fe2acae9d74ea79e8d205b1fb010591260 (patch)
treeb00c7505a0f6a39b68a16874220591fc88c5a9e2 /mod
parente7b9401e4e918ec7c4a442e2acb3fb48926e90a9 (diff)
downloadelgg-b4a744fe2acae9d74ea79e8d205b1fb010591260.tar.gz
elgg-b4a744fe2acae9d74ea79e8d205b1fb010591260.tar.bz2
Removing old time_created fudging for blogs. It doens't work right.
git-svn-id: http://code.elgg.org/elgg/trunk@6465 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/blog_lib.php42
1 files changed, 22 insertions, 20 deletions
diff --git a/mod/blog/blog_lib.php b/mod/blog/blog_lib.php
index 3728b23f7..3152cccad 100644
--- a/mod/blog/blog_lib.php
+++ b/mod/blog/blog_lib.php
@@ -291,27 +291,29 @@ class ElggBlog extends ElggObject {
}
/**
+ * @todo this won't work until we have date l10n working.
* Rewrite the time created to be publish time.
* This is a bit dirty, but required for proper sorting.
*/
- public function save() {
- if (parent::save()) {
- global $CONFIG;
-
- // try to grab the publish date, but default to now.
- foreach (array('publish_date', 'time_created') as $field) {
- if (isset($this->$field) && $this->field) {
- $published = $this->field;
- break;
- }
- }
- if (!$published) {
- $published = time();
- }
- $sql = "UPDATE {$CONFIG->dbprefix}entities SET time_created = '$published', time_updated = '$published' WHERE guid = '{$this->getGUID()}'";
- return update_data($sql);
- }
-
- return FALSE;
- }
+// public function save() {
+// if (parent::save()) {
+// global $CONFIG;
+//
+// // try to grab the publish date, but default to now.
+// foreach (array('publish_date', 'time_created') as $field) {
+// if (isset($this->$field) && $this->field) {
+// $published = $this->field;
+// break;
+// }
+// }
+// if (!$published) {
+// $published = time();
+// }
+//
+// $sql = "UPDATE {$CONFIG->dbprefix}entities SET time_created = '$published', time_updated = '$published' WHERE guid = '{$this->getGUID()}'";
+// return update_data($sql);
+// }
+//
+// return FALSE;
+// }
} \ No newline at end of file