diff --git a/install.php b/install.php index e0e36ef842c..96ffb29579b 100644 --- a/install.php +++ b/install.php @@ -18,8 +18,9 @@ define ('DIRECTORY', 2); /// 2. Directory settings define ('DATABASE', 3); /// 2. Database settings define ('ADMIN', 4); /// 4. Administration directory name define ('ENVIRONMENT', 5); /// 5. Administration directory name -define ('SAVE', 6); /// 6. Save or display the settings -define ('REDIRECT', 7); /// 7. Redirect to index.php +define ('DOWNLOADLANG', 6); /// 6. Load complete lang from download.moodle.org +define ('SAVE', 7); /// 7. Save or display the settings +define ('REDIRECT', 8); /// 8. Redirect to index.php ///==========================================================================// @@ -115,6 +116,7 @@ require_once('./lib/weblib.php'); require_once('./lib/adodb/adodb.inc.php'); require_once('./lib/environmentlib.php'); require_once('./lib/xmlize.php'); +require_once('./lib/componentlib.class.php'); require_once('./version.php'); /// Set version and release @@ -135,6 +137,7 @@ $headstagetext = array(WELCOME => get_string('chooselanguagehead', 'instal DATABASE => get_string('databasesettingshead', 'install'), ADMIN => get_string('admindirsettinghead', 'install'), ENVIRONMENT => get_string('environmenthead', 'install'), + DOWNLOADLANG => get_string('downloadlanguagehead', 'install'), SAVE => get_string('configurationcompletehead', 'install') ); @@ -144,6 +147,7 @@ $substagetext = array(WELCOME => get_string('chooselanguagesub', 'install' DATABASE => get_string('databasesettingssub', 'install'), ADMIN => get_string('admindirsettingsub', 'install'), ENVIRONMENT => get_string('environmentsub', 'install'), + DOWNLOADLANG => get_string('downloadlanguagesub', 'install'), SAVE => get_string('configurationcompletesub', 'install') ); @@ -361,7 +365,6 @@ if ($INSTALL['stage'] == ENVIRONMENT) { } } - //==========================================================================// /// Display or print the data @@ -707,7 +710,62 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") { + +
$errormsg
\n"; + + error_reporting(7); // Show errors + + if ($downloadsuccess) { + print_simple_box(get_string('langdownloadok', 'install', $INSTALL['language']), 'center'); + } else { + print_simple_box(get_string('langdownloaderror', 'install', $INSTALL['language']), 'center'); + } + ?> +