From fa45805d6d7f42884b507361ba51028c5180f384 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 7 Oct 2010 10:22:57 -0400 Subject: [PATCH] Events for showing the notice form --- EVENTS.txt | 6 ++++++ lib/action.php | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/EVENTS.txt b/EVENTS.txt index 2496416173..e5cafa8573 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
) +- $action: action being executed + +EndShowNoticeForm: after showing the notice form (after ) +- $action: action being executed diff --git a/lib/action.php b/lib/action.php index ddc058d418..008f29d03e 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(); }