summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install.php3
-rw-r--r--lib/install.php6
-rw-r--r--templates/show_install_config.inc2
3 files changed, 5 insertions, 6 deletions
diff --git a/install.php b/install.php
index 7832509d..c2b46a7d 100644
--- a/install.php
+++ b/install.php
@@ -105,7 +105,8 @@ switch ($action) {
/* Setup Preferences */
$temp_user = new User($username);
$temp_user->fix_preferences();
- $temp_user = new User(0);
+ $temp_user = new User(-1);
+ $temp_user->username = '-1';
$temp_user->fix_preferences();
diff --git a/lib/install.php b/lib/install.php
index e0a4492a..c3c1c8b4 100644
--- a/lib/install.php
+++ b/lib/install.php
@@ -240,10 +240,8 @@ function install_create_account($username,$password) {
$sql = "INSERT INTO user (`username`,`password`,`offset_limit`,`access`) VALUES ('$username',PASSWORD('$password'),'50','admin')";
$db_results = mysql_query($sql, $dbh);
- $insert_id = mysql_insert_id($dbh);
-
- if (!$insert_id) {
- $GLOBALS['error']->add_error('general',"Insert of Base User Failed, Check test.php");
+ if (!$db_results) {
+ $GLOBALS['error']->add_error('general',"Insert of Base User Failed " . mysql_error());
return false;
}
diff --git a/templates/show_install_config.inc b/templates/show_install_config.inc
index ba4478fb..a8a46466 100644
--- a/templates/show_install_config.inc
+++ b/templates/show_install_config.inc
@@ -122,7 +122,7 @@
<tr>
<td>&nbsp;</td>
<td>
- <a href="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $GLOBALS['php_self']; ?>?action=show_create_config&local_db=<?php echo $_REQUEST['local_db']; ?>&local_host=<?php echo $_REQUEST['local_host']; ?>">[<?php echo _("Check for Config"); ?>]</a>
+ <a href="<?php echo $http_type . $_SERVER['HTTP_HOST'] . "/" . $GLOBALS['php_self']; ?>?action=show_create_config&local_db=<?php echo $_REQUEST['local_db']; ?>&local_host=<?php echo $_REQUEST['local_host']; ?>">[<?php echo _("Check for Config"); ?>]</a>
</td>
</tr>
</table>