[pmwiki-devel] Updating PTVs

Hans design5 at softflow.co.uk
Thu Feb 4 08:39:01 CST 2010


Wednesday, February 3, 2010, 10:59:24 PM, DaveG wrote:

> I suspect BlogIt might be falling foul of this also. The solution is 
> then to use Hans's code snippet from the other thread?

>   if ($FoxEnablePTVRefresh==1 && is_array($PCache[$pagename])) {
>     foreach(array_keys($PCache[$pagename]) as $key)
>       if (substr($key,0,3)=='=p_' || $key=='=pagetextvars')
>         unset($PCache[$pagename][$key]);
>   }

Perhaps it will do for you (without the$FoxEnablePTVRefresh config
variable).

I've removed that snippet from fox.php and use two lines like this instead,
to set a modifed PTV value and to add a new PTV:

  $GLOBALS['PCache'][$targetname']['=p_'.$key] = $val;

So the PTV Cache is no longer cleared, but updated.


Hans




More information about the pmwiki-devel mailing list