]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
store replies on the notice record, not the reply record
authorEvan Prodromou <evan@prodromou.name>
Wed, 9 Jul 2008 20:27:16 +0000 (16:27 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 9 Jul 2008 20:27:16 +0000 (16:27 -0400)
darcs-hash:20080709202716-84dde-30ffe46b711ff108fa210757eeb856803b09de82.gz

lib/util.php

index 1a83f0fffa9a140d058ab2643115c8be442088e9..d529b910958d55223b1d6ab0ac3209d1fd4cc620 100644 (file)
@@ -872,15 +872,14 @@ function common_save_replies($notice) {
                }
                if ($i == 0) {
                        $reply_for = $recipient;
+                       $recipient_notice = $reply_for->getCurrentNotice();
+                       $orig = clone($notice);
+                       $notice->reply_to = $recipient_notice->id;
+                       $notice->update($orig);
                }
                $reply = new Reply();
                $reply->notice_id = $notice->id;
                $reply->profile_id = $recipient->id;
-               if ($reply_for) {
-#                      $recipient_notice = $reply_for->getCurrentNotice($notice->created);
-                       $recipient_notice = $reply_for->getCurrentNotice();
-                       $reply->replied_id = $recipient_notice->id;
-               }
                $id = $reply->insert();
                if (!$id) {
                        $last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');