function upgrade()
 {
     global $request;
     global $WikiTheme;
     define('WIKI_PGSRC', 'codendipgsrc');
     define('DEFAULT_WIKI_PGSRC', PHPWIKI_SRC_PATH . '/codendipgsrc');
     define('ENABLE_EMAIL_NOTIFIFICATION', false);
     $request = $this->getRequest();
     $request->setArg('overwrite', 'true');
     require_once PHPWIKI_SRC_PATH . "/lib/upgrade.php";
     // WikiTheme and those files are required because of the WikiLink
     // function used during upgrade process.
     require_once PHPWIKI_SRC_PATH . "/lib/WikiTheme.php";
     require_once PHPWIKI_SRC_PATH . "/themes/Codendi/themeinfo.php";
     $check = false;
     CheckActionPageUpdate($request, $check);
     CheckPgsrcUpdate($request, $check);
 }
예제 #2
0
/** entry function from lib/main.php
 */
function DoUpgrade($request)
{
    if (!$request->_user->isAdmin()) {
        $request->_notAuthorized(WIKIAUTH_ADMIN);
        $request->finish(HTML::div(array('class' => 'disabled-plugin'), fmt("Upgrade disabled: user != isAdmin")));
        return;
    }
    //print("<br>This action is blocked by administrator. Sorry for the inconvenience !<br>");
    exit("<br>This action is blocked by administrator. Sorry for the inconvenience !<br>");
    StartLoadDump($request, _("Upgrading this PhpWiki"));
    //CheckOldIndexUpdate($request); // to upgrade from < 1.3.10
    CheckDatabaseUpdate($request);
    // first check cached_html and friends
    CheckActionPageUpdate($request);
    CheckPgsrcUpdate($request);
    //CheckThemeUpdate($request);
    //CheckPluginUpdate($request);
    CheckConfigUpdate($request);
    EndLoadDump($request);
}