本文整理汇总了PHP中upgrade_stale_php_files_present函数的典型用法代码示例。如果您正苦于以下问题:PHP upgrade_stale_php_files_present函数的具体用法?PHP upgrade_stale_php_files_present怎么用?PHP upgrade_stale_php_files_present使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了upgrade_stale_php_files_present函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install_core
}
install_core($version, true);
}
// Check version of Moodle code on disk compared with database
// and upgrade if possible.
$stradministration = get_string('administration');
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
if (empty($CFG->version)) {
print_error('missingconfigversion', 'debug');
}
if ($version > $CFG->version) {
// upgrade
purge_all_caches();
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
if (upgrade_stale_php_files_present()) {
$PAGE->set_title($stradministration);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgrade_stale_php_files_page();
die;
}
if (empty($confirmupgrade)) {
$a = new stdClass();
$a->oldversion = "{$CFG->release} ({$CFG->version})";
$a->newversion = "{$release} ({$version})";
$strdatabasechecking = get_string('databasechecking', '', $a);
$PAGE->set_title($stradministration);
$PAGE->set_heading($strdatabasechecking);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
示例2: test_upgrade_stale_php_files_present
/**
* Test the {@link upgrade_stale_php_files_present() function
*/
public function test_upgrade_stale_php_files_present()
{
// Just call the function, must return bool false always
// if there aren't any old files in the codebase.
$this->assertFalse(upgrade_stale_php_files_present());
}