summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-10-20 18:41:48 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-10-20 18:41:48 +0200
commit18829381465e518a65e285578ee67a3daf88de98 (patch)
tree9026394de387276880a95ced29942425295bbb98
parent4d38dd27def63a7f5d5673e38b2cc1c06193238e (diff)
downloadrpg-18829381465e518a65e285578ee67a3daf88de98.tar.gz
rpg-18829381465e518a65e285578ee67a3daf88de98.tar.bz2
used named submitbuttons instead of localized labels
darcs-hash:20061020164148-7ad00-6bb857729d9004b0f9b865410c1c666e07cc03aa.gz
-rw-r--r--inc/actions.php10
-rw-r--r--inc/html.php14
2 files changed, 8 insertions, 16 deletions
diff --git a/inc/actions.php b/inc/actions.php
index e3ddfecc0..4eb857be0 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -140,14 +140,6 @@ function act_clean($act){
list($act) = array_keys($act);
}
- //handle localized buttons
- if($act == $lang['btn_save']) $act = 'save';
- if($act == $lang['btn_preview']) $act = 'preview';
- if($act == $lang['btn_cancel']) $act = 'show';
- if($act == $lang['btn_recover']) $act = 'recover';
- if($act == $lang['btn_draftdel']) $act = 'draftdel';
-
-
//remove all bad chars
$act = strtolower($act);
$act = preg_replace('/[^a-z_]+/','',$act);
@@ -172,7 +164,7 @@ function act_clean($act){
if(!in_array($act,array('login','logout','register','save','edit','draft',
'preview','search','show','check','index','revisions',
'diff','recent','backlink','admin','subscribe',
- 'unsubscribe','profile','resendpwd','recover',
+ 'unsubscribe','profile','resendpwd','recover','wordblock',
'draftdel',)) && substr($act,0,7) != 'export_' ) {
msg('Command unknown: '.htmlspecialchars($act),-1);
return 'show';
diff --git a/inc/html.php b/inc/html.php
index ae6e53729..169b056ea 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -297,9 +297,9 @@ function html_draft(){
<div id="draft__status"><?php echo $lang['draftdate'].' '.date($conf['dformat'],filemtime($INFO['draft']))?></div>
- <input class="button" type="submit" name="do" value="<?php echo $lang['btn_recover']?>" tabindex="1" />
- <input class="button" type="submit" name="do" value="<?php echo $lang['btn_draftdel']?>" tabindex="2" />
- <input class="button" type="submit" name="do" value="<?php echo $lang['btn_cancel']?>" tabindex="3" />
+ <input class="button" type="submit" name="do[recover]" value="<?php echo $lang['btn_recover']?>" tabindex="1" />
+ <input class="button" type="submit" name="do[draftdel]" value="<?php echo $lang['btn_draftdel']?>" tabindex="2" />
+ <input class="button" type="submit" name="do[show]" value="<?php echo $lang['btn_cancel']?>" tabindex="3" />
</form>
<?php
}
@@ -880,8 +880,8 @@ function html_conflict($text,$summary){
<input type="hidden" name="wikitext" value="<?php echo formText($text)?>" />
<input type="hidden" name="summary" value="<?php echo formText($summary)?>" />
- <input class="button" type="submit" name="do" value="<?php echo $lang['btn_save']?>" accesskey="s" title="<?php echo $lang['btn_save']?> [ALT+S]" />
- <input class="button" type="submit" name="do" value="<?php echo $lang['btn_cancel']?>" />
+ <input class="button" type="submit" name="do[save]" value="<?php echo $lang['btn_save']?>" accesskey="s" title="<?php echo $lang['btn_save']?> [ALT+S]" />
+ <input class="button" type="submit" name="do[cancel]" value="<?php echo $lang['btn_cancel']?>" />
</div>
</form>
<br /><br /><br /><br />
@@ -1121,8 +1121,8 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
<div id="size__ctl"></div>
<?php if($wr){?>
<div class="editButtons">
- <input class="button" id="edbtn__save" type="submit" name="do" value="<?php echo $lang['btn_save']?>" accesskey="s" title="<?php echo $lang['btn_save']?> [ALT+S]" tabindex="4" />
- <input class="button" id="edbtn__preview" type="submit" name="do" value="<?php echo $lang['btn_preview']?>" accesskey="p" title="<?php echo $lang['btn_preview']?> [ALT+P]" tabindex="5" />
+ <input class="button" id="edbtn__save" type="submit" name="do[save]" value="<?php echo $lang['btn_save']?>" accesskey="s" title="<?php echo $lang['btn_save']?> [ALT+S]" tabindex="4" />
+ <input class="button" id="edbtn__preview" type="submit" name="do[preview]" value="<?php echo $lang['btn_preview']?>" accesskey="p" title="<?php echo $lang['btn_preview']?> [ALT+P]" tabindex="5" />
<input class="button" type="submit" name="do[draftdel]" value="<?php echo $lang['btn_cancel']?>" tabindex="6" />
</div>
<?php } ?>