From a3da5b24c9fc602e147304333ac059d0aae13de7 Mon Sep 17 00:00:00 2001 From: Julien C Date: Sun, 7 Feb 2010 18:29:42 +0100 Subject: [PATCH] Misc small fixes, plus a new hook in tag.php --- EVENTS.txt | 2 +- actions/tag.php | 13 +++++++++---- plugins/RSSCloud/RSSCloudPlugin.php | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/EVENTS.txt b/EVENTS.txt index 2da6f3da61..cf9c6123f3 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -141,7 +141,7 @@ StartLogout: Before logging out EndLogout: After logging out - $action: the logout action -ArgsInitialized: After the argument array has been initialized +ArgsInitialize: After the argument array has been initialized - $args: associative array of arguments, can be modified StartAddressData: Allows the site owner to provide additional information about themselves for contact (e.g., tagline, email, location) diff --git a/actions/tag.php b/actions/tag.php index ee9617b662..72668a0c91 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -102,12 +102,17 @@ class TagAction extends Action function showContent() { - $nl = new NoticeList($this->notice, $this); + if(Event::handle('StartTagShowContent', array($this))) { + + $nl = new NoticeList($this->notice, $this); - $cnt = $nl->show(); + $cnt = $nl->show(); - $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, - $this->page, 'tag', array('tag' => $this->tag)); + $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, + $this->page, 'tag', array('tag' => $this->tag)); + + Event::handle('EndTagShowContent', array($this)) + } } function isReadOnly($args) diff --git a/plugins/RSSCloud/RSSCloudPlugin.php b/plugins/RSSCloud/RSSCloudPlugin.php index 9f444c8bba..001106acec 100644 --- a/plugins/RSSCloud/RSSCloudPlugin.php +++ b/plugins/RSSCloud/RSSCloudPlugin.php @@ -105,7 +105,7 @@ class RSSCloudPlugin extends Plugin * @return boolean hook return */ - function onRouterInitialized(&$m) + function onRouterInitialized($m) { $m->connect('/main/rsscloud/request_notify', array('action' => 'RSSCloudRequestNotify'));