]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Workaround for reply timeline since_id issue: save the notice.created value into...
authorBrion Vibber <brion@pobox.com>
Fri, 25 Feb 2011 21:22:13 +0000 (13:22 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 25 Feb 2011 21:22:13 +0000 (13:22 -0800)
As a hack this removes the mysql_timestamp bit from the field settings on reply.modified so that our value actually gets saved. This *should* work ok as long as system timezone is set correctly, which we now set to UTC to match when connecting.

classes/Notice.php
classes/statusnet.ini
plugins/TwitterBridge/twitterimport.php

index c9cca8a96952b7724f62827dc2261584831af3d4..a26a6f0f0d2b28feda30d53a693e5a09247524be 100644 (file)
@@ -1072,6 +1072,7 @@ class Notice extends Memcached_DataObject
 
             $reply->notice_id  = $this->id;
             $reply->profile_id = $profile->id;
+            $reply->modified   = $this->created;
 
             common_log(LOG_INFO, __METHOD__ . ": saving reply: notice $this->id to profile $profile->id");
 
@@ -1132,6 +1133,7 @@ class Notice extends Memcached_DataObject
 
                 $reply->notice_id  = $this->id;
                 $reply->profile_id = $mentioned->id;
+                $reply->modified   = $this->created;
 
                 $id = $reply->insert();
 
index ef631e28d376668940e579f05cc0a300ad14cab4..1916c2513972aa78339b3d5270c31524eee10f7d 100644 (file)
@@ -502,7 +502,8 @@ uri = U
 [reply]
 notice_id = 129
 profile_id = 129
-modified = 384
+modified = 142
+;modified = 384 ; skipping the mysql_timestamp mode so we can override its setting
 replied_id = 1
 
 [reply__keys]
index 5ddf5380d745128a2057a6085bb1a01435b1bb74..0eacfcd62c57cf10dc05350dc0a52ff88347d726 100644 (file)
@@ -675,6 +675,7 @@ class TwitterImport
                     $reply = new Reply();
                     $reply->notice_id  = $notice->id;
                     $reply->profile_id = $user->id;
+                    $reply->modified   = $notice->created;
                     common_log(LOG_INFO, __METHOD__ . ": saving reply: notice {$notice->id} to profile {$user->id}");
                     $id = $reply->insert();
                 }