Merged upgrade environment check from stable MDL-8527

This commit is contained in:
moodler 2007-02-15 06:30:35 +00:00
parent c7a990842f
commit 29e05913b8

View file

@ -270,13 +270,24 @@
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, " ", " "); print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, " ", " ");
print_heading("Moodle $release"); print_heading("Moodle $release");
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes')); print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
echo '<form action="index.php"><fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="confirmupgrade" value="1" />'; require_once($CFG->libdir.'/environmentlib.php');
echo '<input type="hidden" name="confirmrelease" value="1" />'; print_heading(get_string('environment', 'admin'));
echo '</fieldset>'; if (!check_moodle_environment($release, $environment_results, true)) {
echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="0" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>'; notice_yesno(get_string('environmenterrorupgrade', 'admin'),
echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>'; 'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
echo '</form>'; } else {
notify(get_string('environmentok', 'admin'), 'notifysuccess');
echo '<form action="index.php"><fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '</fieldset>';
echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="0" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
}
print_footer('none'); print_footer('none');
die; die;
} else { } else {