[pmwiki-users] Restore little feature lost w 2.2.5?

Eemeli Aro eemeli at gmail.com
Mon Aug 31 12:57:03 CDT 2009


2009/8/31 Tegan Dowling <tmdowling at gmail.com>:
> I had my sites set up so that action=edit would always display the page
> preview below the EditQuickReference.  This was accomplished by having this
> in local\config.php:
>     ## Show preview below all edits
>        if ($action == 'edit') $_POST['preview'] = 1;
>
> Now edit mode no longer displays the preview until I hit the preview button
> (as in the default PmWiki configuration).  What change can I make to restore
> this lost functionality?

Use this instead:

if ($action == 'edit') $_REQUEST['preview'] = 1;

The array checked by PreviewPage() was changed to support using
preview as a GET attribute; $_REQUEST combines all GET, POST and
cookie variables into one array, but when you set a value directly
with PHP as you do, it doesn't automagically get set in $_REQUEST as
well.

eemeli



More information about the pmwiki-users mailing list