From cf81b04aec397fc5abc6ec1078d5f77df2b72770 Mon Sep 17 00:00:00 2001 From: andi Date: Wed, 20 Apr 2005 21:30:03 +0200 Subject: fixed action on localized buttons darcs-hash:20050420193003-9977f-7270a55bba706dbdde401918b7fa342616392ba3.gz --- inc/actions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index be44471d4..9fb186b00 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -85,6 +85,11 @@ function act_clean($act){ global $lang; global $conf; + //handle localized buttons + if($act == $lang['btn_save']) $act = 'save'; + if($act == $lang['btn_preview']) $act = 'preview'; + if($act == $lang['btn_cancel']) $act = 'show'; + //remove all bad chars $act = strtolower($act); $act = preg_replace('/[^a-z_]+/','',$act); @@ -92,9 +97,6 @@ function act_clean($act){ if($act == 'register' && !$conf['openregister']) return 'show'; - if($act == $lang['btn_save']) $act = 'save'; - if($act == $lang['btn_preview']) $act = 'preview'; - if($act == $lang['btn_cancel']) $act = 'show'; if($act == 'export_html') $act = 'export_xhtml'; if(array_search($act,array('login','logout','register','save','edit', -- cgit v1.2.3