[pmwiki-users] Question on overriding actions
Patrick R. Michaud
pmichaud at pobox.com
Mon Oct 27 15:13:25 CDT 2008
On Mon, Oct 27, 2008 at 02:45:23PM -0500, Mark Paterson wrote:
> ... It appears that if I define my own action in the form
> following the Fox action, PmWiki will process my action instead of Fox's (i.e.
> PmWiki will take the last action specified and throw away any earlier ones). Is
> this a kosher thing to do? Should I worry that in a future version PmWiki will
> process all actions, or maybe process the first action rather than the last?
PmWiki doesn't determine this -- it depends on how your browser chooses to
send the 'action' control, and how PHP elects to convert that into
$_GET['action']. PmWiki just takes any value of $_GET['action'] that it
happens to receive and uses that.
At any rate, there are no plans for PmWiki to change the way it handles
actions in the 2.x series.
> Is there a better way to handle this situation?
Perhaps use a control name other than 'action' and check for it in
config.php -- if it exists then use that to (re)set the $action
variable that PmWiki uses.
Or, create a custom form tag that uses exactly the action you want.
More information about the pmwiki-users