01059: Allow Drafts for actions other than Edit
Description: Hi. I am working on a recipe that makes content translation in PmWiki much easier in different languages .
Enabling the Drafts feature, and having a *-Draft version, makes PmWiki redirect to '?action=edit', an 'edit' box for the draft page, instead of the 'translate' interface. The '?action=edit' link is hardcoded in scripts/draft.php.
This could be improved if the draft.php script issues a redirect not towards a hardcoded '?action=edit' link, but to the currently used global $action variable.
It is easily fixed by altering the function EditDraft() of the scripts/draft.php file:
- end of line 47, change "
" to "
- line 58, change "
Redirect($draftname, '$PageUrl?action=edit');" to "
Thanks, --Petko January 02, 2009, at 01:36 AM