]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18167 more distro hooks refactoring - agreed with Eloy
authorskodak <skodak>
Sat, 7 Feb 2009 20:03:25 +0000 (20:03 +0000)
committerskodak <skodak>
Sat, 7 Feb 2009 20:03:25 +0000 (20:03 +0000)
install.php
install/distribution.html
install/stringnames.txt
lang/en_utf8/install.php
lib/installlib.php

index 00e7c7979e3b24bda7b6531f4f723bc00191c387..7cee92d2e806d228c9dfda67cf0470f3c4bc9b17 100644 (file)
@@ -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">';
index aec58a96b1daaf0cba241611a1cbf696e37fa9b1..2c72d68d408506c88ba16eafcf02eed4092cb44a 100644 (file)
@@ -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); ?>
\ No newline at end of file
index d5ea8298590d8e05968ff50d9243e9982c748fd7..c428f33cb5598baaedf15421441b86736a296bf9 100644 (file)
@@ -13,7 +13,6 @@ errorsinenvironment
 environmentsub2
 dataroot
 dirroot
-distribution
 environmentrequireinstall
 environmentrequireversion
 installation
index 9603a2873e2d44319ba1acc7f4b9e5d688eb5cb0..eb57517e68dbc3700c8c9ce0616f95da03009e1e 100644 (file)
@@ -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 &quot;$a&quot; language pack';
 $string['downloadlanguagehead'] = 'Download language pack';
index 391b6f41a80af611aff2a4f5bbfcae346f7d4f89..51ad35f0b60f51281bce607731b9f14015fc6aec 100644 (file)
@@ -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;
 }