3 function AutoCreatePage($page, $text, $redirect = null
) {
4 global $pagename, $WikiDir;
5 $pagename_ = str_replace('/','.',$pagename);
6 $group = substr($pagename_,0,strrpos($pagename_,'.'));
8 $page = str_replace('$Group', $group, $page);
9 if ($pagename_ == $page && !$WikiDir->exists($pagename_)) {
10 $WikiDir->write($pagename_, array('text' => $text));
11 if ($redirect != '') {
12 $redirect = $pagename_;