[pmwiki-users] How to do the equivalent of hitting "save" on every page on the wiki?

Alex Eftimiades alexeftimiades at gmail.com
Thu Aug 16 17:20:41 CDT 2012


This is what I have so far:
#code
if($action=='update'){
   set_time_limit(180);
   $pages=ListPages('/Researchers.*/');
   foreach(array_slice($pages,0,3) as $pn){
     $thispage=ReadPage($pn, READPAGE_CURRENT);
     $thisnewpage=$thispage;
     UpdatePage($pn,$thispage,$thisnewpage);
     print_r($thisnewpage);
     if($thispage!=$thisnewpage) WritePage($pn,$thisnewpage);
   }
}
#end code
It does no work as I had hoped. As you can see, I do only the first 3  
page ListPages finds in the group Researchers just to see how it does.  
It appears UpdatePage is not going through all the functions that get  
evaluated when you hit "save." Any ideas would be greatly appreciated  
as I wanted to show this website to some people tomorrow.

Thanks,
Alex




More information about the pmwiki-users mailing list