From f75c2328ccb87650e107e90b89b4d2a16d7a29cd Mon Sep 17 00:00:00 2001
From: Sarven Capadisli <csarven@controlyourself.ca>
Date: Fri, 20 Feb 2009 23:47:24 +0000
Subject: [PATCH] Hooks for: local navigation

---
 EVENTS.txt     | 6 ++++++
 lib/action.php | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/EVENTS.txt b/EVENTS.txt
index af0bee587c..37e2203d50 100644
--- a/EVENTS.txt
+++ b/EVENTS.txt
@@ -82,3 +82,9 @@ StartNoticeSave: before inserting a notice (good place for content filters)
 EndNoticeSave: after inserting a notice and related code
 - $notice: notice that was saved (with ID and URI)
 
+StartShowLocalNavBlock: Showing the local nav menu
+- $action: the current action
+
+EndShowLocalNavBlock: At the end of the local nav menu
+- $action: the current action
+
diff --git a/lib/action.php b/lib/action.php
index b1e700b670..a468c638cd 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -474,7 +474,10 @@ class Action extends HTMLOutputter // lawsuit
     function showCore()
     {
         $this->elementStart('div', array('id' => 'core'));
-        $this->showLocalNavBlock();
+        if (Event::handle('StartShowLocalNavBlock', array($this))) {
+            $this->showLocalNavBlock();
+            Event::handle('EndShowLocalNavBlock', array($this));
+        }
         if (Event::handle('StartShowContentBlock', array($this))) {
             $this->showContentBlock();
             Event::handle('EndShowContentBlock', array($this));
-- 
2.39.5