[dokuwiki] Re: ACTION_ACT_PREPROCESS and act_clean

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 20 Oct 2006 16:56:14 +0100

Andreas Gohr wrote:

Hi Chris and others!

I'm just working on another action plugin and encountered a problem
with the ACTION_ACT_PREPROCESS hook.

It does get the $ACT variable uncleaned, this is fine for handling new
actions, but it is somewhat bad for checking for default actions. Eg.
the save action is the localized Save button label. The sanitizing is
only done later in act_clean.

Do you have any ideas how to make this a little bit simpler for plugin
authors? Eg. precleaning without aborting on unknown actions could work.

Andi

can't plugin authors check against $lang[<their action>] ?
which I guess I should have done in the login redirector :)

For my own stuff, I prefer to use an array and assign the key rather than the button value.

e.g.  <input type="submit" name="do[login]" value="<lang str>" />
$ACT = key($_REQUEST['do']);

perhaps dokuwiki could change to use the same method?

Cheers,

Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: