summaryrefslogtreecommitdiff
path: root/lib/tpl
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-08-01 19:31:35 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-08-01 19:31:35 +0200
commitab3a75dc6d3e7c7136a38c796c4b0da66ce96bc2 (patch)
treea7f0445d4c0405b7437915d92a9dd5181cf89f05 /lib/tpl
parent0a8f03d88cd0597d1317cf5164383dea2ae29ca4 (diff)
downloadrpg-ab3a75dc6d3e7c7136a38c796c4b0da66ce96bc2.tar.gz
rpg-ab3a75dc6d3e7c7136a38c796c4b0da66ce96bc2.tar.bz2
rename event to TEMPLATE_DOKUWIKI_PAGETOOLS_DISPLAY
also made it more secure against copy'n'paste
Diffstat (limited to 'lib/tpl')
-rw-r--r--lib/tpl/dokuwiki/detail.php6
-rw-r--r--lib/tpl/dokuwiki/main.php6
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php
index 1768b665e..76a6c7140 100644
--- a/lib/tpl/dokuwiki/detail.php
+++ b/lib/tpl/dokuwiki/detail.php
@@ -124,7 +124,11 @@ header('X-UA-Compatible: IE=edge,chrome=1');
$data['img_backto'] = '<li><a href="'.wl($ID).'" class="back"><span>'.$lang['img_backto'].' '.$ID.'</span></a></li>';
// the page tools can be ammended through a custom plugin hook
- $evt = new Doku_Event('TEMPLATE_DOKUWIKI_PAGETOOLFLOAT_DISPLAY', $data);
+ // if you're deriving from this template and your design is close enough to
+ // the dokuwiki template you might want to trigger a DOKUWIKI event instead
+ // of using $conf['tpl'] here
+ $hook = 'TEMPLATE_'.strtoupper($conf['tpl']).'_PAGETOOLS_DISPLAY';
+ $evt = new Doku_Event($hook, $data);
if($evt->advise_before()){
foreach($evt->data as $k => $html) echo $html;
}
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 30cd4dda9..712d01175 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -85,7 +85,11 @@ $showSidebar = $hasSidebar && ($ACT=='show');
);
// the page tools can be ammended through a custom plugin hook
- $evt = new Doku_Event('TEMPLATE_DOKUWIKI_PAGETOOLFLOAT_DISPLAY', $data);
+ // if you're deriving from this template and your design is close enough to
+ // the dokuwiki template you might want to trigger a DOKUWIKI event instead
+ // of using $conf['tpl'] here
+ $hook = 'TEMPLATE_'.strtoupper($conf['tpl']).'_PAGETOOLS_DISPLAY';
+ $evt = new Doku_Event($hook, $data);
if($evt->advise_before()){
foreach($evt->data as $k => $html) echo $html;
}