]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18167 towareds reimplementing of win installer support
authorskodak <skodak>
Sat, 7 Feb 2009 14:08:44 +0000 (14:08 +0000)
committerskodak <skodak>
Sat, 7 Feb 2009 14:08:44 +0000 (14:08 +0000)
install.php
install/distribution.html [new file with mode: 0644]
install/stringnames.txt
lang/en_utf8/install.php

index 0892c464a3e21cba17ec9e806512734cc1fb8f52..7654f091ad728cd3d6960faec26bec5e929bc729 100644 (file)
@@ -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 (file)
index 0000000..aec58a9
--- /dev/null
@@ -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); ?>
\ No newline at end of file
index c428f33cb5598baaedf15421441b86736a296bf9..d5ea8298590d8e05968ff50d9243e9982c748fd7 100644 (file)
@@ -13,6 +13,7 @@ errorsinenvironment
 environmentsub2
 dataroot
 dirroot
+distribution
 environmentrequireinstall
 environmentrequireversion
 installation
index eb57517e68dbc3700c8c9ce0616f95da03009e1e..9603a2873e2d44319ba1acc7f4b9e5d688eb5cb0 100644 (file)
@@ -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 &quot;$a&quot; language pack';
 $string['downloadlanguagehead'] = 'Download language pack';