[dokuwiki] Re: [PATCH] New request-parameter redirect_id

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 20 Aug 2008 14:45:43 +0100


On 20 Aug 2008, at 14:26, Christopher Smith wrote:



Rather than editing the core, you are probably better off implementing this as an action plugin.

You can use:
- HTML_EDITFORM_OUTPUT to add your hidden field to the form
- DOKUWIKI_STARTED to detect the returning field and if necessary redirect to the page it indicates


Forget that. I see your problem. You need the updated page saved. Once it has been saved there is no way to prevent/alter the standard dokuwiki redirect.

Still on the not needing to change the core, perhaps a new event could be created to wrap the current redirect, along the lines of

name: ACT_REDIRECT_ONSAVE
data: array/object containing three values, page id, fragment-id, more
preventable:  yes
action: redirect to url created by combining the three data values
result: return value for act_save if no redirect takes place

notes: after advise will not occur unless action (redirect) is prevented.


- Chris

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

Other related posts: