diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-07-09 16:27:16 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-07-09 16:27:16 -0400 |
commit | cbe07c1d37d0bf0edf9a448cc1c3c58676304af7 (patch) | |
tree | 20fe3288e096c66e4c54a9fd23c8aa97cf27e517 /lib | |
parent | e22df4be30edbdad436c36df13fba38d1ca35467 (diff) |
store replies on the notice record, not the reply record
darcs-hash:20080709202716-84dde-30ffe46b711ff108fa210757eeb856803b09de82.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php index 1a83f0fff..d529b9109 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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'); |