[pmwiki-devel] Updating PTVs
Peter Bowers
pbowers at pobox.com
Wed Feb 3 04:51:44 CST 2010
On Wed, Feb 3, 2010 at 10:21 AM, Hans <design5 at softflow.co.uk> wrote:
>
> When a PTV 'var' gets updated and the page redisplayed with
> HandleBrowse() instead of Redirect(), although the new value
> is saved to file the old value still displays with {$:var}
>
> To circumvent this I have modified Fox now so that the PTVs in
> the page cache get cleared at the end of Fox's processes.
> Now PTVs show with the updated values, and redirect is not needed.
> This has also the benefit that Fox can show relevant messages.
>
> Are there any disadvantages doing it this way?
There is a static definition of $status in PageTextVar() but as long
as you aren't accessing a given PTV more than 500 times (configurable)
then it shouldn't be a problem... Did you just clear
$PCache[$page]['=pagetextvars'] and $PCache[$page]['=p_*']? I
remember struggling with this once before and being very frustrated --
right now it looks like a great solution...
-Peter
More information about the pmwiki-devel
mailing list