summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-10-07 10:22:57 -0400
committerEvan Prodromou <evan@status.net>2010-10-07 10:22:57 -0400
commitfa45805d6d7f42884b507361ba51028c5180f384 (patch)
tree267bab80fc71b957a4a3923285e260451fe9bed9
parent8d2ccee3f62b06c4b8eb6fc15dd5a74d4211643d (diff)
Events for showing the notice form
-rw-r--r--EVENTS.txt6
-rw-r--r--lib/action.php5
2 files changed, 10 insertions, 1 deletions
diff --git a/EVENTS.txt b/EVENTS.txt
index 249641617..e5cafa857 100644
--- a/EVENTS.txt
+++ b/EVENTS.txt
@@ -1136,3 +1136,9 @@ StartShowFeedLink: before showing an individual feed item
EndShowFeedLink: after showing an individual feed
- $action: action being executed
- $feed: feed to show
+
+StartShowNoticeForm: before showing the notice form (before <form>)
+- $action: action being executed
+
+EndShowNoticeForm: after showing the notice form (after <form>)
+- $action: action being executed
diff --git a/lib/action.php b/lib/action.php
index ddc058d41..008f29d03 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -397,7 +397,10 @@ class Action extends HTMLOutputter // lawsuit
Event::handle('EndShowSiteNotice', array($this));
}
if (common_logged_in()) {
- $this->showNoticeForm();
+ if (Event::handle('StartShowNoticeForm', array($this))) {
+ $this->showNoticeForm();
+ Event::handle('EndShowNoticeForm', array($this));
+ }
} else {
$this->showAnonymousMessage();
}