diff --git a/main.php b/main.php
index 8015e64..ed63970 100644
--- a/main.php
+++ b/main.php
@@ -73,7 +73,7 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
would be: tpl_action('edit', 0, 'li') */
?>
- tpl_action('admin', 1, 'li', 1),
'userpage' => _tpl_action('userpage', 1, 'li', 1),
'profile' => tpl_action('profile', 1, 'li', 1),
@@ -89,7 +89,7 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
- tpl_action('recent', 1, 'li', 1),
'media' => tpl_action('media', 1, 'li', 1),
'index' => tpl_action('index', 1, 'li', 1),
@@ -149,7 +149,7 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
- tpl_action('edit', 1, 'li', 1),
'discussion'=> _tpl_action('discussion', 1, 'li', 1),
'revisions' => tpl_action('revisions', 1, 'li', 1),
diff --git a/tpl_functions.php b/tpl_functions.php
index 2a11146..79b3807 100644
--- a/tpl_functions.php
+++ b/tpl_functions.php
@@ -83,22 +83,22 @@ function _tpl_action($type, $link=0, $wrapper=0) {
}
/**
- * Create event for tools menues
- *
- * @author Anika Henke
+ * copied to core (available since Detritus)
*/
-function _tpl_toolsevent($toolsname, $items, $view='main') {
- $data = array(
- 'view' => $view,
- 'items' => $items
- );
+if (!function_exists('tpl_toolsevent')) {
+ function tpl_toolsevent($toolsname, $items, $view='main') {
+ $data = array(
+ 'view' => $view,
+ 'items' => $items
+ );
- $hook = 'TEMPLATE_'.strtoupper($toolsname).'_DISPLAY';
- $evt = new Doku_Event($hook, $data);
- if($evt->advise_before()){
- foreach($evt->data['items'] as $k => $html) echo $html;
+ $hook = 'TEMPLATE_'.strtoupper($toolsname).'_DISPLAY';
+ $evt = new Doku_Event($hook, $data);
+ if($evt->advise_before()){
+ foreach($evt->data['items'] as $k => $html) echo $html;
+ }
+ $evt->advise_after();
}
- $evt->advise_after();
}
/**