From 5c752f6cd18341f7357f7f3a659833db9200dc67 Mon Sep 17 00:00:00 2001
From: chris <chris@jalakai.co.uk>
Date: Fri, 14 Apr 2006 22:17:05 +0200
Subject: [PATCH] event ACTION_TEMPLATE

This event is advisory only.
Event data is the $ACT variable
The default action is to display an "unknown action" message

The event is triggered by tpl_content if it does not recognise the $ACT value. It is
the complement to event 'ACTION_DISPATCH'.  Handlers of this event can output XHTML
which will be displayed in the main dokuwiki window - ie. where the wiki page would
normally be displayed.

darcs-hash:20060414201705-9b6ab-f8ede6a2fb601d734c115ee09bb57195ad7d1e2b.gz
---
 inc/template.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/inc/template.php b/inc/template.php
index 64c87d583..4383c7a6b 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -109,7 +109,10 @@ function tpl_content(){
       tpl_admin();
       break;
     default:
-            msg("Failed to handle command: ".hsc($ACT),-1);
+      $evt = new event('ACTION_TEMPLATE',$ACT);
+      $evt->advise();
+      if ($evt->_default)
+        msg("Failed to handle command: ".hsc($ACT),-1);
   }
 }
 
-- 
GitLab