[pmwiki-devel] Updating PTVs

Petko Yotov 5ko at 5ko.fr
Wed Feb 3 15:10:20 CST 2010


On Wednesday 03 February 2010 22:03:24, Petko Yotov wrote :
> On Wednesday 03 February 2010 21:49:55, Hans 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}
> 
> I think you could place such a line just before calling UpdatePage() :
> 
>   PCache($pagename, $new); # $new['text'] contains the updated PTVs
>   UpdatePage($pagename, $page, $new); # as usual

Ah, but this may not work if you already called PageTextVar() before this. 

So yes, you may have to either unset all cached PTVs after saving the file and 
they will be re-cached, or update the cached values.

Petko



More information about the pmwiki-devel mailing list