PITS /
01059: Allow Drafts for actions other than Edit
Summary: Allow Drafts for actions other than Edit
Created: 2009-01-02 01:35
Status: Open
Category: Feature
From: Petko
Assigned:
Priority: 3
Version: any
OS:
Description: Hi. I am working on a recipe that makes content translation in PmWiki much easier in different languages [1].
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 "$RecentChangesFmt
;
"$RecentChangesFmt
, $action; - line 58, change "
Redirect($draftname, '$PageUrl?action=edit');
" to "Redirect($draftname, "\$PageUrl?action=$action");
"
Thanks, --Petko January 02, 2009, at 01:36 AM