[pmwiki-devel] [patch] PreviewPage bug for Restore

Daniel Roesler diafygi at gmail.com
Wed Mar 11 15:21:45 CDT 2009


Ahoy all,

I found a small bug in the Restore link on the history page
(?action=diff). The link contains the option ?preview=y, but no
preview is displayed. This is because in the PreviewPage function in
pmwiki.php, only $_POST is checked for a 'preview' option. The
$Condition['e_preview'] variable in forms.php also only checks $_POST.
Is there a reason they cannot be changed to $_REQUEST instead of
$_POST?

http://www.pmwiki.org/wiki/PITS/01081

Here's my proposed changes (diff format):
pmwiki.php:
------------------------
1729c1729
<   if (@$_POST['preview']) {
---
>   if (@$_REQUEST['preview']) {
------------------------

forms.php:
------------------------
260c260
< $Conditions['e_preview'] = '(boolean)$_POST["preview"]';
---
> $Conditions['e_preview'] = '(boolean)$_REQUEST["preview"]';
------------------------



More information about the pmwiki-devel mailing list