delete($pagename); WritePage($pagename, $page); Redirect($pagename); exit; } ## -- For expiring all pages at once; first parameter is the desired group, ## second parameter tells whether a backup should be done, ## third parameter tells which DIFFs should be kept. function ExpireDiffAll($group='',$backup=1,$keepdays=0) { global $WikiDir,$Now; $pagelist = $WikiDir->ls(); $pagelist = array_unique($pagelist); sort($pagelist); foreach($pagelist as $k=>$p) if (!(($group==substr($p,0,strpos($p,"."))) or ($group==''))) { unset($pagelist[$k]); } $pagecount = count($pagelist); echo "
I'm now removing the DIFFs from the files (pages) you have stored in your wiki. When this is finished you can get rid of the ExpireDiff(...); line in your local/config.php
"; if ($pagelist) { foreach($pagelist as $p) { echo "Removed DIFFs from ", $pagecount, " pages.
\n"; echo "Now you can get rid of the ExpireDiff(...); line in your local/config.php
\n"; exit(0); }