From: Evan Prodromou Date: Sat, 14 Aug 2010 19:03:25 +0000 (-0700) Subject: Merge branch 'noticetitle' into 0.9.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=21bf50bad61a3ff99c7decc6949b14191407648c;p=quix0rs-gnu-social.git Merge branch 'noticetitle' into 0.9.x --- 21bf50bad61a3ff99c7decc6949b14191407648c diff --cc actions/newnotice.php index 61b38786bd,ca6355cbff..ea832cf4e1 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@@ -204,12 -203,19 +204,20 @@@ class NewnoticeAction extends Actio $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)); if ($this->boolean('ajax')) { header('Content-Type: text/xml;charset=utf-8');