当前位置: 首页>>代码示例>>PHP>>正文


PHP upgrade_init_javascript函数代码示例

本文整理汇总了PHP中upgrade_init_javascript函数的典型用法代码示例。如果您正苦于以下问题:PHP upgrade_init_javascript函数的具体用法?PHP upgrade_init_javascript怎么用?PHP upgrade_init_javascript使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了upgrade_init_javascript函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list

    }
    if (empty($confirmrelease)) {
        require_once $CFG->libdir . '/environmentlib.php';
        list($envstatus, $environment_results) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
        $strcurrentrelease = get_string('currentrelease');
        $PAGE->navbar->add($strcurrentrelease);
        $PAGE->set_title($strinstallation);
        $PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
        $PAGE->set_cacheable(false);
        $output = $PAGE->get_renderer('core', 'admin');
        echo $output->install_environment_page($maturity, $envstatus, $environment_results, $release);
        die;
    }
    //TODO: add a page with list of non-standard plugins here
    $strdatabasesetup = get_string('databasesetup');
    upgrade_init_javascript();
    $PAGE->navbar->add($strdatabasesetup);
    $PAGE->set_title($strinstallation . ' - Moodle ' . $CFG->target_release);
    $PAGE->set_heading($strinstallation);
    $PAGE->set_cacheable(false);
    $output = $PAGE->get_renderer('core', 'admin');
    echo $output->header();
    if (!$DB->setup_is_unicodedb()) {
        if (!$DB->change_db_encoding()) {
            // If could not convert successfully, throw error, and prevent installation
            print_error('unicoderequired', 'admin');
        }
    }
    install_core($version, true);
}
// Check version of Moodle code on disk compared with database
开发者ID:numbas,项目名称:moodle,代码行数:31,代码来源:index.php

示例2: upgrade_started

/**
 * Marks start of upgrade, blocks any other access to site.
 * The upgrade is finished at the end of script or after timeout.
 *
 * @global object
 * @global object
 * @global object
 */
function upgrade_started($preinstall=false) {
    global $CFG, $DB, $PAGE, $OUTPUT;

    static $started = false;

    if ($preinstall) {
        ignore_user_abort(true);
        upgrade_setup_debug(true);

    } else if ($started) {
        upgrade_set_timeout(120);

    } else {
        if (!CLI_SCRIPT and !$PAGE->headerprinted) {
            $strupgrade  = get_string('upgradingversion', 'admin');
            $PAGE->set_pagelayout('maintenance');
            upgrade_init_javascript();
            $PAGE->set_title($strupgrade.' - Moodle '.$CFG->target_release);
            $PAGE->set_heading($strupgrade);
            $PAGE->navbar->add($strupgrade);
            $PAGE->set_cacheable(false);
            echo $OUTPUT->header();
        }

        ignore_user_abort(true);
        core_shutdown_manager::register_function('upgrade_finished_handler');
        upgrade_setup_debug(true);
        set_config('upgraderunning', time()+300);
        $started = true;
    }
}
开发者ID:jtibbetts,项目名称:moodle,代码行数:39,代码来源:upgradelib.php


注:本文中的upgrade_init_javascript函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。