summaryrefslogtreecommitdiff
path: root/actions/newnotice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-08-13 11:21:07 -0700
committerEvan Prodromou <evan@status.net>2010-08-13 11:21:07 -0700
commit7dd46222a86a54be9d268a36291b795087fbd5c8 (patch)
treec468a55c4aeebbabb89ce931a9070aa4d51a1a4b /actions/newnotice.php
parent79b5f1cea5ffadf18d3680ddeb1f8bd4d974b059 (diff)
add StartNoticeSaveWeb and EndNoticeSaveWeb to hook web-based UI for notices
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 748d104ff..ca6355cbf 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -203,10 +203,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));
}
if ($this->boolean('ajax')) {