SiteAdmin.* foreach(array('AuthUser', 'NotifyList', 'Blocklist', 'ApprovedUrls') as $n) { $n0 = "$SiteGroup.$n"; $n1 = "$SiteAdminGroup.$n"; StopWatch("HandleUpgrade: checking $n0 -> $n1"); ## checking AuthUser is special, because Site.AuthUser comes with the ## distribution. if ($n == 'AuthUser') { ## if we already have a user-modified SiteAdmin.AuthUser, we can skip SDV($AuthUserPageFmt, '$SiteAdminGroup.AuthUser'); $n1 = FmtPageName($AuthUserPageFmt, $pagename); $page = ReadPage($n1, READPAGE_CURRENT); if (@$page['time'] > 1000000000) continue; ## if there's not a user-modified Site.AuthUser, we can skip $page = ReadPage($n0, READPAGE_CURRENT); if (@$page['time'] == 1000000000) continue; } else if (!PageExists($n0) || PageExists($n1)) continue; if (@$_REQUEST['migrate'] == 'yes') { ## if the admin wants PmWiki to migrate, do it. $page = RetrieveAuthPage($n0, 'admin', true); StopWatch("HandleUpgrade: copying $n0 -> $n1"); if ($page) { WritePage($n1, $page); $done .= "
  • Copied $n0 to $n1
  • "; continue; } } $message .= "
  • $n0 -> $n1
  • "; } if ($message) { $migrateurl = "$ScriptUrl?action=upgrade&migrate=yes"; $infourl = 'http://www.pmwiki.org/wiki/PmWiki/UpgradeToSiteAdmin'; $message = "

    Upgrade notice -- SiteAdmin group

    This version of PmWiki expects several administrative pages from the Site group to be found in a new SiteAdmin group. On this site, the following pages appear to need to be relocated:

    For more information about this change, including the various options for proceeding, see

    $infourl

    If you would like PmWiki to attempt to automatically copy these pages into their new
    locations for you, try (admin password required)

    If you want to configure PmWiki so that it continues to look for the above pages in $SiteGroup, add the following line near the top of local/config.php:

    \$SiteAdminGroup = \$SiteGroup;
    $Version "; print $message; exit; } StopWatch("UpgradeCheck: writing $StatusPageName"); Lock(2); SDV($StatusPageName, "$SiteAdminGroup.Status"); $page = ReadPage($StatusPageName); $page['updatedto'] = $VersionNum; WritePage($StatusPageName, $page); if ($done) { $done .= "
  • Updated $StatusPageName
  • "; echo "

    Upgrade to $Version ... ok

    "; $GLOBALS['EnableRedirect'] = 0; } Redirect($pagename); }