summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-11-11 21:01:42 +0100
committerAndreas Gohr <andi@splitbrain.org>2005-11-11 21:01:42 +0100
commitc591aabe4bfdea879a1804e525b40a697ba9afce (patch)
tree6796ffc1993fdff066921576b237954f08194b01 /inc/template.php
parent4cb796577ee06e5db0058b4a820243db1b9a48f4 (diff)
downloadrpg-c591aabe4bfdea879a1804e525b40a697ba9afce.tar.gz
rpg-c591aabe4bfdea879a1804e525b40a697ba9afce.tar.bz2
JavaScript Fixes for the toolbar #628
darcs-hash:20051111200142-7ad00-158925aee01bc24378a8bd99ad27a6173ea085dd.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/inc/template.php b/inc/template.php
index 71bb64b4c..9fee928ae 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -201,9 +201,17 @@ function tpl_metaheaders(){
// load javascript
$js_edit = ($ACT=='edit' || $ACT=='preview') ? 1 : 0;
$js_write = ($INFO['writable']) ? 1 : 0;
- $js_sig = ($conf['useacl'] && $_SERVER['REMOTE_USER']) ? 1 : 0;
+ if($js_edit && $js_write){
+ ptln('<script language="javascript" type="text/javascript" charset="utf-8">',$it);
+ ptln("NS='".$INFO['namespace']."';",$it+2);
+ if($conf['useacl'] && $_SERVER['REMOTE_USER']){
+ require_once('inc/toolbar.php');
+ ptln("SIG='".toolbar_signature()."';",$it+2);
+ }
+ ptln('</script>',$it);
+ }
ptln('<script language="javascript" type="text/javascript" charset="utf-8" src="'.
- DOKU_BASE.'lib/exe/js.php?edit='.$js_edit.'&amp;write='.$js_write.'&amp;sig='.$js_sig.'"></script>',$it);
+ DOKU_BASE.'lib/exe/js.php?edit='.$js_edit.'&amp;write='.$js_write.'"></script>',$it);
}
/**