summaryrefslogtreecommitdiff
path: root/actions/newnotice.php
diff options
context:
space:
mode:
authormatthew.gregg <matthew.gregg@gmail.com>2008-06-22 23:08:37 -0400
committermatthew.gregg <matthew.gregg@gmail.com>2008-06-22 23:08:37 -0400
commit0b21ac3dd79d2bf39341a4f0ff3566def8282eae (patch)
tree61ed08b832cda8e104dee168b300133c90540231 /actions/newnotice.php
parent6dbf7beb0bfce429f1c39b64e85cdac8229cb72d (diff)
First pass at replies support http://laconi.ca/PITS/00080
Doesn't handle a reply to a user that has never updated. darcs-hash:20080623030837-982e4-532ccd8899fd8be00575f8840da0defb44cd56f8.gz
Diffstat (limited to 'actions/newnotice.php')
-rw-r--r--actions/newnotice.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index 64fe2494b..9aaf4b4d3 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -36,6 +36,12 @@ class NewnoticeAction extends Action {
function save_new_notice() {
+ #remember the current notice
+ $current_notice = DB_DataObject::factory('notice');
+ $current_notice->limit(1);
+ $current_notice->orderBy('created DESC');
+ $current_notice->find(1);
+
$user = common_current_user();
assert($user); # XXX: maybe an error instead...
$notice = DB_DataObject::factory('notice');
@@ -67,7 +73,7 @@ class NewnoticeAction extends Action {
common_server_error(_t('Problem saving notice.'));
return;
}
-
+
common_broadcast_notice($notice);
$returnto = $this->trimmed('returnto');
if ($returnto) {