summaryrefslogtreecommitdiff
path: root/inc/html.php
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-03-09 10:37:35 +0100
committerAdrian Lang <lang@cosmocode.de>2010-03-09 12:06:55 +0100
commitffde0ac9c67ac7dea5886a325e05300c3a88c163 (patch)
tree5a53e4ab7d477ddab4e199a990ee827838173e01 /inc/html.php
parentbce53b1fc1455d813331e735c7102be19fc1fc48 (diff)
downloadrpg-ffde0ac9c67ac7dea5886a325e05300c3a88c163.tar.gz
rpg-ffde0ac9c67ac7dea5886a325e05300c3a88c163.tar.bz2
Allow plugins to manage edit intro text
Diffstat (limited to 'inc/html.php')
-rw-r--r--inc/html.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/inc/html.php b/inc/html.php
index 88fa0b4ff..d9766e543 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1183,28 +1183,18 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
$wr = $INFO['writable'] && !$INFO['locked'];
if($wr){
- if ($REV) print p_locale_xhtml('editrev');
- print p_locale_xhtml($include);
+ if ($REV) $include = 'editrev';
}else{
// check pseudo action 'source'
if(!actionOK('source')){
msg('Command disabled: source',-1);
return;
}
- print p_locale_xhtml('read');
+ $include = 'read';
}
if(!$DATE) $DATE = $INFO['lastmod'];
- global $conf;
global $license;
- global $lang;
- global $REV;
- global $DATE;
- global $PRE;
- global $SUF;
- global $INFO;
- global $SUM;
- global $ID;
$form = new Doku_Form(array('id' => 'dw__editform'));
$form->addHidden('id', $ID);
@@ -1216,7 +1206,11 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
$data = compact('wr', 'text', 'form');
$data['media_manager'] = true;
+ $data['intro_locale'] = $include;
trigger_event('HTML_EDIT_FORMSELECTION', $data, 'html_edit_form', true);
+ if (isset($data['intro_locale'])) {
+ echo p_locale_xhtml($data['intro_locale']);
+ }
$form->addElement(form_makeOpenTag('div', array('id'=>'wiki__editbar')));
$form->addElement(form_makeOpenTag('div', array('id'=>'size__ctl')));