]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Removing old time_created fudging for blogs. It doens't work right.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 11 Jun 2010 22:05:52 +0000 (22:05 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 11 Jun 2010 22:05:52 +0000 (22:05 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6465 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/blog/blog_lib.php

index 3728b23f79ce730f3c0e4038c5508d777d805a78..3152cccada4eeb2cc1da376e0d0f75063322e7d4 100644 (file)
@@ -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