From: defacer Date: Thu, 19 Aug 2004 08:12:28 +0000 (+0000) Subject: CSS hack for the Prev/Next buttons so that hitting ENTER would take you to X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cd0e958ed3f2537afc4dd51d5aa4437f4200c6fd;p=moodle.git CSS hack for the Prev/Next buttons so that hitting ENTER would take you to the next page. It works just fine! :-) Also, a die() added after the redirection if config.php exists, for good measure. --- diff --git a/install.php b/install.php index 42f2ac135c..72116d0311 100644 --- a/install.php +++ b/install.php @@ -3,8 +3,9 @@ /// If config.php exists already then we are not needed. -if (file_exists('./config.php')) { +if (file_exists('./config.php')) { header('Location: index.php'); + die(); } else { $configfile = './config.php'; } @@ -117,20 +118,20 @@ if (isset($_POST['stage'])) { } else { $nextstage = $_POST['stage'] - 1; } - + if ($nextstage < 0) $nextstage = 0; - + /// Store any posted data foreach ($_POST as $setting=>$value) { $INSTALL[$setting] = $value; } - + } else { $goforward = true; $nextstage = 0; - + } @@ -142,13 +143,13 @@ if (isset($_POST['stage'])) { if ($INSTALL['stage'] == 2) { error_reporting(0); - + /// check wwwroot if (($fh = @fopen($INSTALL['wwwroot'].'/install.php', 'r')) === false) { $errormsg = get_string('wwwrooterror', 'install'); } else { fclose($fh); - + /// check dirroot if (($fh = @fopen($INSTALL['dirroot'].'/install.php', 'r')) === false ) { $CFG->dirroot = dirname(__FILE__); @@ -156,17 +157,17 @@ if ($INSTALL['stage'] == 2) { $errormsg = get_string('dirrooterror', 'install'); } else { fclose($fh); - + $CFG->dirroot = $INSTALL['dirroot']; /// check dataroot $CFG->dataroot = $INSTALL['dataroot']; if (make_upload_directory('sessions', false) === false ) { $errormsg = get_string('datarooterror', 'install'); - } + } } } - + if (!empty($errormsg)) $nextstage = 2; @@ -185,7 +186,7 @@ if ($INSTALL['stage'] == 3) { if (empty($INSTALL['dbname'])) { $INSTALL['dbname'] = 'moodle'; } - + /// different format for postgres7 by socket if ($INSTALL['dbtype'] == 'postgres7' and ($INSTALL['dbhost'] == 'localhost' || $INSTALL['dbhost'] == '127.0.0.1')) { $INSTALL['dbhost'] = "user='{$INSTALL['dbuser']}' password='{$INSTALL['dbpass']}' dbname='{$INSTALL['dbname']}'"; @@ -200,11 +201,11 @@ if ($INSTALL['stage'] == 3) { $db = &ADONewConnection($INSTALL['dbtype']); - error_reporting(0); // Hide errors - + error_reporting(0); // Hide errors + if (! $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'])) { /// The following doesn't seem to work but we're working on it - /// If you come up with a solution for creating a database in MySQL + /// If you come up with a solution for creating a database in MySQL /// feel free to put it in and let us know if ($dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'])) { switch ($INSTALL['dbtype']) { /// Try to create a database @@ -342,7 +343,7 @@ if (isset($_GET['help'])) { - + $errormsg

\n"; @@ -389,7 +390,7 @@ if ($nextstage == 5) { - - - - - 0) ? "\n" : " \n" ?> - -  \n"; ?> - - \n" : " \n" ?> - - - + + + + "; echo "\n"; } - + //==========================================================================// @@ -636,7 +634,7 @@ function css_styles() {