From: skodak Date: Sat, 10 Jan 2009 22:13:12 +0000 (+0000) Subject: MDL-17845 removed install/upgrade autopilot - not needed any more ;-) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ac110efc6f18df0f776c0f6b7595148c176f8ef1;p=moodle.git MDL-17845 removed install/upgrade autopilot - not needed any more ;-) there are now only two upgrade pages, one for core, the second for all plugins --- diff --git a/admin/cliupgrade.php b/admin/cliupgrade.php index 522afe8bd1..85ed390e22 100644 --- a/admin/cliupgrade.php +++ b/admin/cliupgrade.php @@ -796,7 +796,6 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) { if (!$confirmrelease) { console_write_error('versionerror'); } - $autopilot = 1 ; $strdatabasesetup = get_string("databasesetup"); $strdatabasesuccess = get_string("databasesuccess"); @@ -918,10 +917,8 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) { } } else { - if ( $interactive == CLI_FULL || ($interactive == CLI_SEMI && !isset($INSTALL['autopilot']))) { + if ( $interactive == CLI_FULL || $interactive == CLI_SEMI) { console_write('environmentok', 'admin'); - console_write('unattendedoperation','admin'); - $autopilot = read_boolean(); } } } @@ -1058,8 +1055,6 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) { /// just make sure upgrade logging is properly terminated upgrade_log_finish(); - unset($SESSION->installautopilot); - /// Set up the site if (! $site = get_site()) { // We are about to create the site "course" diff --git a/lib/adminlib.php b/lib/adminlib.php index 3c70411015..3a53534255 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -40,7 +40,6 @@ function upgrade_db($version, $release) { $confirmrelease = optional_param('confirmrelease', $unittest, PARAM_BOOL); $confirmplugins = optional_param('confirmplugincheck', $unittest, PARAM_BOOL); $agreelicense = optional_param('agreelicense', $unittest, PARAM_BOOL); - $autopilot = optional_param('autopilot', $unittest, PARAM_BOOL); $setuptesttables = optional_param('setuptesttables', false, PARAM_BOOL); $continuesetuptesttables = optional_param('continuesetuptesttables', false, PARAM_BOOL); $upgradetesttables = optional_param('upgradetesttables', false, PARAM_BOOL); @@ -50,11 +49,6 @@ function upgrade_db($version, $release) { $return_url = "$CFG->wwwroot/$CFG->admin/report/unittest/index.php?continuesetuptesttables=$continuesetuptesttables&upgradetesttables=$upgradetesttables"; } - /// set install/upgrade autocontinue session flag - if ($autopilot) { - $SESSION->installautopilot = $autopilot; - } - /// Check if the main tables have been installed yet or not. if (!$tables = $DB->get_tables() ) { // No tables yet at all. $maintables = false; @@ -72,7 +66,7 @@ function upgrade_db($version, $release) { unset($mtables); unset($tables); - if ($unittest && $autopilot) { + if ($unittest) { echo upgrade_get_javascript(); } @@ -104,7 +98,6 @@ function upgrade_db($version, $release) { echo ''; echo ''; echo ''; - echo '
'; echo '

'; echo ''; print_footer('none'); @@ -279,7 +272,6 @@ function upgrade_db($version, $release) { echo ''; echo ''; echo ''; - echo '
'; echo '

'; echo ''; print_footer('none'); @@ -393,8 +385,6 @@ function upgrade_db($version, $release) { /// just make sure upgrade logging is properly terminated upgrade_log_finish(); - unset($SESSION->installautopilot); - // Turn xmlstrictheaders back on now. $CFG->xmlstrictheaders = $origxmlstrictheaders; @@ -1299,16 +1289,9 @@ function print_progress_redraw($thisbarid, $done, $total, $width, $donetext='') } function upgrade_get_javascript() { - global $CFG, $SESSION; - - if (!empty($SESSION->installautopilot)) { - $linktoscrolltoerrors = ''."\n"; - } else { - $linktoscrolltoerrors = ''."\n"; - } - $linktoscrolltoerrors .= ''; + global $CFG; - return $linktoscrolltoerrors; + return ''; } function create_admin_user($user_input=NULL) { diff --git a/lib/scroll_to_errors.js b/lib/scroll_to_errors.js index 3038837e2d..452622bd3f 100644 --- a/lib/scroll_to_errors.js +++ b/lib/scroll_to_errors.js @@ -145,10 +145,6 @@ // automatically scroll to the first warning or continue button initScroll(warnings[0]); - if (statusOk && installautopilot) {//global JS variable - document.getElementsByClassName('singlebutton')[0].childNodes[0].submit(); // Changed this to work for test tables install - // document.forms[0].submit();//auto submit - } }; // load should be a document event, but most browsers use window