Recent Changes - Search:

PITS main list

edit sidebar

Main sidebar

PmWiki

pmwiki.org

01081

Summary: Restore in Page History does not preview
Created: 2009-03-11 15:06
Status: Closed (fixed for 2.2.1)
Category: Bug
From: Diafygi
Assigned:
Priority: 1
Version: 2.2.0
OS: any/any/any

Description: The "Restore" link on the History page (generated with ?action=diff) includes the ?preview=y option. However, when the edit page loads with the restored text, a preview is not displayed.

This is because in /pmwiki.php the condition for showing a preview depends on $_POST['preview'], but not $_GET['preview']. Also, in /scripts/forms.php the condition for e_preview needs to be changed from $_POST.

To fix, $_REQUEST should be used instead of $_POST.

Diff to correct pmwiki.php:

1729c1729
<   if (@$_POST['preview']) {
---
>   if (@$_REQUEST['preview']) {

forms.php:

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

Thanks, fixed in SVN for the next version. --Petko March 11, 2009, at 03:41 PM

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:56 AM