diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-08-26 17:11:08 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-08-26 17:11:08 -0400 |
commit | b1ff7d7a2bb21a0ca345c828335f32b3c44407fb (patch) | |
tree | 234ee9d4211796f82e96f880e443d71368948ebd /classes | |
parent | 4a28e70cf8c933642f73de677800dc255562cd58 (diff) |
fix error storing uris of remote notices
darcs-hash:20080826211108-84dde-b277bdb1476b9cec0c0d93fa8d565c4642ba16c8.gz
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Notice.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 57adb7ef8..8c2097589 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -75,8 +75,8 @@ class Notice extends DB_DataObject } return true; } - - static function saveNew($profile_id, $content, $source=NULL, $is_local=1, $reply_to=NULL) { + + static function saveNew($profile_id, $content, $source=NULL, $is_local=1, $reply_to=NULL, $uri=NULL) { $notice = new Notice(); $notice->profile_id = $profile_id; @@ -96,12 +96,18 @@ class Notice extends DB_DataObject } $orig = clone($notice); - $notice->uri = common_notice_uri($notice); + if ($uri) { + $notice->uri = $uri; + } else { + $notice->uri = common_notice_uri($notice); + } if (!$notice->update($orig)) { return _('Problem saving notice.'); } + # XXX: do we need to change this for remote users? + common_save_replies($notice); $notice->saveTags(); |