From: skodak Date: Sat, 7 Feb 2009 14:08:44 +0000 (+0000) Subject: MDL-18167 towareds reimplementing of win installer support X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5c1fb7d4d16684487dd9231500c6c281b6cfd0e1;p=moodle.git MDL-18167 towareds reimplementing of win installer support --- diff --git a/install.php b/install.php index 0892c464a3..7654f091ad 100644 --- a/install.php +++ b/install.php @@ -40,6 +40,17 @@ require dirname(__FILE__).'/lib/installlib.php'; // TODO: add lang detection here if empty $_REQUEST['lang'] +// distro specific customisation +$distro = null; +if (file_exists('install/versions.php')) { + $a = null; + include('install/versions.php'); + if ($a) { + $distro = $a; + unset($a); + } +} + $config = new stdClass(); $config->lang = $lang; @@ -55,6 +66,9 @@ if (!empty($_POST)) { if ($config->stage == INSTALL_ENVIRONMENT or $config->stage == INSTALL_DOWNLOADLANG) { $config->stage--; } + if (INSTALL_DISTRIBUTION and empty($distro)) { + $config->stage--; + } } else if (isset($_POST['next'])) { $config->stage++; } @@ -443,8 +457,12 @@ if ($config->stage == INSTALL_ENVIRONMENT or $config->stage == INSTALL_PATHS) { if ($config->stage == INSTALL_DISTRIBUTION) { - // TODO: reimplement welcome.html support for win installer - $config->stage = INSTALL_PATHS; + if (!$distro) { + $config->stage = INSTALL_PATHS; + } else { + include('install/distribution.html'); + die; + } } diff --git a/install/distribution.html b/install/distribution.html new file mode 100644 index 0000000000..aec58a96b1 --- /dev/null +++ b/install/distribution.html @@ -0,0 +1,18 @@ + + +

+ +

+

+

+

+ + \ No newline at end of file diff --git a/install/stringnames.txt b/install/stringnames.txt index c428f33cb5..d5ea829859 100644 --- a/install/stringnames.txt +++ b/install/stringnames.txt @@ -13,6 +13,7 @@ errorsinenvironment environmentsub2 dataroot dirroot +distribution environmentrequireinstall environmentrequireversion installation diff --git a/lang/en_utf8/install.php b/lang/en_utf8/install.php index eb57517e68..9603a2873e 100644 --- a/lang/en_utf8/install.php +++ b/lang/en_utf8/install.php @@ -193,6 +193,7 @@ directory must be readable AND WRITEABLE by the web server user directly via the web.'; $string['dirroot'] = 'Moodle Directory'; $string['dirrooterror'] = 'The \'Moodle Directory\' setting seems to be incorrect - we can\'t find a Moodle installation there. The value below has been reset.'; +$string['distribution'] = 'Distribution'; $string['download'] = 'Download'; $string['downloadlanguagebutton'] = 'Download the "$a" language pack'; $string['downloadlanguagehead'] = 'Download language pack';