Greetings. Is there a more elegant way to do this, than what I have done in my local/config.php?
Is there a way to minimise disk reading? --- function PerPageSummaryLog($pagename, &$page, &$new) { // No summary logs for log pages. if (!strpos($pagename, "SummaryLog") && !strpos($pagename, "RecentChanges")) { // If the page has no configuration file. if(!file_exists($LocalDir . $pagename . ".php")) { // Write configuration file. $file = fopen($LocalDir . $pagename . ".php", "w"); fwrite($file, $newfileconfig); fclose($file); } // If the page already has a configuration file. else { // Make sure we don't clobber an already existing log setting for the page. $file = fopen($LocalDir . $pagename . ".php", "r"); $configfile = fread($file, filesize($LocalDir . $pagename . ".php")); fclose($file); if(!strpos($configfile, "RecentChangesFmt['" . $pagename . "SummaryLog']")) { $file = fopen($LocalDir . $pagename . ".php", "a"); fwrite($file, $appendfileconfig); fclose($file); } } } } array_unshift($EditFunctions, 'PerPageSummaryLog'); Best regards :o) Johnny :o) _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users