mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
MDL-18167 more distro hooks refactoring - agreed with Eloy
This commit is contained in:
parent
cc8727451f
commit
64c368e3df
41
install.php
41
install.php
@ -42,13 +42,8 @@ require dirname(__FILE__).'/lib/installlib.php';
|
||||
|
||||
// distro specific customisation
|
||||
$distro = null;
|
||||
if (file_exists('install/versions.php')) {
|
||||
$a = null;
|
||||
include('install/versions.php');
|
||||
if ($a) {
|
||||
$distro = $a;
|
||||
unset($a);
|
||||
}
|
||||
if (file_exists('install/distro.php')) {
|
||||
include('install/distro.php');
|
||||
}
|
||||
|
||||
$config = new stdClass();
|
||||
@ -69,9 +64,6 @@ 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++;
|
||||
}
|
||||
@ -479,17 +471,6 @@ if ($config->stage == INSTALL_ENVIRONMENT or $config->stage == INSTALL_PATHS) {
|
||||
|
||||
|
||||
|
||||
if ($config->stage == INSTALL_DISTRIBUTION) {
|
||||
if (!$distro) {
|
||||
$config->stage = INSTALL_PATHS;
|
||||
} else {
|
||||
include('install/distribution.html');
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($config->stage == INSTALL_PATHS) {
|
||||
$paths = array('wwwroot' => get_string('wwwroot', 'install'),
|
||||
'dirroot' => get_string('dirroot', 'install'),
|
||||
@ -550,9 +531,21 @@ if ($config->stage == INSTALL_PATHS) {
|
||||
|
||||
|
||||
$config->stage = INSTALL_WELCOME;
|
||||
install_print_header($config, get_string('language'),
|
||||
get_string('chooselanguagehead', 'install'),
|
||||
get_string('chooselanguagesub', 'install'));
|
||||
|
||||
if ($distro) {
|
||||
ob_start();
|
||||
include('install/distribution.html');
|
||||
$sub = ob_get_clean();
|
||||
|
||||
install_print_header($config, get_string('language'),
|
||||
get_string('chooselanguagehead', 'install'),
|
||||
$sub);
|
||||
|
||||
} else {
|
||||
install_print_header($config, get_string('language'),
|
||||
get_string('chooselanguagehead', 'install'),
|
||||
get_string('chooselanguagesub', 'install'));
|
||||
}
|
||||
|
||||
$languages = install_get_list_of_languages();
|
||||
echo '<div class="userinput">';
|
||||
|
@ -1,9 +1,3 @@
|
||||
<?php
|
||||
install_print_header($config, get_string('distribution', 'install'),
|
||||
get_string('welcomep10', 'install', $distro),
|
||||
get_string('welcomep20', 'install', $distro));
|
||||
?>
|
||||
|
||||
<p><?php print_string('welcomep30', 'install', $distro) ?></p>
|
||||
<ul>
|
||||
<li><?php p($distro->webname) ?> <?php p($distro->webversion) ?></li>
|
||||
@ -14,5 +8,3 @@ install_print_header($config, get_string('distribution', 'install'),
|
||||
<p><?php print_string('welcomep50', 'install', $distro) ?></p>
|
||||
<p><?php print_string('welcomep60', 'install', $distro) ?></p>
|
||||
<p><?php print_string('welcomep70', 'install', $distro) ?></p>
|
||||
|
||||
<?php install_print_footer($config); ?>
|
@ -13,7 +13,6 @@ errorsinenvironment
|
||||
environmentsub2
|
||||
dataroot
|
||||
dirroot
|
||||
distribution
|
||||
environmentrequireinstall
|
||||
environmentrequireversion
|
||||
installation
|
||||
|
@ -193,7 +193,6 @@ 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';
|
||||
|
@ -5,13 +5,12 @@
|
||||
*/
|
||||
|
||||
define('INSTALL_WELCOME', 0);
|
||||
define('INSTALL_DISTRIBUTION', 1);
|
||||
define('INSTALL_ENVIRONMENT', 2);
|
||||
define('INSTALL_PATHS', 3);
|
||||
define('INSTALL_DOWNLOADLANG', 4);
|
||||
define('INSTALL_DATABASETYPE', 5);
|
||||
define('INSTALL_DATABASE', 6);
|
||||
define('INSTALL_SAVE', 7);
|
||||
define('INSTALL_ENVIRONMENT', 1);
|
||||
define('INSTALL_PATHS', 2);
|
||||
define('INSTALL_DOWNLOADLANG', 3);
|
||||
define('INSTALL_DATABASETYPE', 4);
|
||||
define('INSTALL_DATABASE', 5);
|
||||
define('INSTALL_SAVE', 6);
|
||||
|
||||
/**
|
||||
*Tries to detect the right www root setting.
|
||||
@ -351,7 +350,7 @@ fieldset {
|
||||
width:95%;
|
||||
}
|
||||
|
||||
.stage7 .stage {
|
||||
.stage6 .stage {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user