diff options
author | Brion Vibber <brion@pobox.com> | 2010-08-16 16:56:27 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-08-16 16:56:27 -0700 |
commit | 0cfaae48a34da0307c0e713164ebbf5440cb3de0 (patch) | |
tree | 2d9d44ee20aa4b6e718f2a96955291ec5931b034 /actions | |
parent | 341b935acc0111bc2bfa69be5687c4e6f255d8ce (diff) | |
parent | a68c10280fd66f1a6e8d7a776bacfcf38907afa6 (diff) |
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'actions')
-rw-r--r-- | actions/newnotice.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php index 61b38786b..ea832cf4e 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -204,10 +204,18 @@ class NewnoticeAction extends Action $options = array_merge($options, $locOptions); } - $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options); + $author_id = $user->id; + $text = $content_shortened; - if (isset($upload)) { - $upload->attachToNotice($notice); + if (Event::handle('StartNoticeSaveWeb', array($this, &$author_id, &$text, &$options))) { + + $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options); + + if (isset($upload)) { + $upload->attachToNotice($notice); + } + + Event::handle('EndNoticeSaveWeb', array($this, $notice)); } Event::handle('EndSaveNewNoticeWeb', array($this, $user, &$content_shortened, &$options)); |