Skip to content

Commit

Permalink
MDL-18167 towareds reimplementing of win installer support
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Feb 7, 2009
1 parent 4d92866 commit 5c1fb7d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
22 changes: 20 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@

// 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;

Expand All @@ -55,6 +66,9 @@
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++;
}
Expand Down Expand Up @@ -443,8 +457,12 @@


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;
}
}


Expand Down
18 changes: 18 additions & 0 deletions install/distribution.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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>
<li><?php p($distro->phpname) ?> <?php p($distro->phpversion) ?></li>
<li><?php p($distro->dbname) ?> <?php p($distro->dbversion) ?></li>
</ul>
<p><?php print_string('welcomep40', 'install', $distro) ?></p>
<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); ?>
1 change: 1 addition & 0 deletions install/stringnames.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ errorsinenvironment
environmentsub2
dataroot
dirroot
distribution
environmentrequireinstall
environmentrequireversion
installation
Expand Down
1 change: 1 addition & 0 deletions lang/en_utf8/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
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 &quot;$a&quot; language pack';
$string['downloadlanguagehead'] = 'Download language pack';
Expand Down

0 comments on commit 5c1fb7d

Please sign in to comment.