summaryrefslogtreecommitdiff
path: root/actions/newnotice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-08-14 12:03:25 -0700
committerEvan Prodromou <evan@status.net>2010-08-14 12:03:25 -0700
commit21bf50bad61a3ff99c7decc6949b14191407648c (patch)
tree7b25a3647080d20506d4043d757eb47ed62ce098 /actions/newnotice.php
parent926c77246bb168097b3f937b5cc22ee9721b83c9 (diff)
parent401cf36de3bcce681f95344cc479f0594014b028 (diff)
Merge branch 'noticetitle' into 0.9.x
Diffstat (limited to 'actions/newnotice.php')
-rw-r--r--actions/newnotice.php14
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));