aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-06-23 20:02:16 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-06-23 20:02:16 +0000
commita27ce549bd66654e2a95d67922e945ba9d438ee4 (patch)
treed0cbe0a077bf73dbaa2ae2fbd07bc30cec9c8b5e
parent16a40387f1ea5e43b53b31a1040138c7fb94a1af (diff)
downloadforums-a27ce549bd66654e2a95d67922e945ba9d438ee4.tar
forums-a27ce549bd66654e2a95d67922e945ba9d438ee4.tar.gz
forums-a27ce549bd66654e2a95d67922e945ba9d438ee4.tar.bz2
forums-a27ce549bd66654e2a95d67922e945ba9d438ee4.tar.xz
forums-a27ce549bd66654e2a95d67922e945ba9d438ee4.zip
- Extra error handling to deal with a user not specifying a database name
- Re-add the move of the manage users module git-svn-id: file:///svn/phpbb/trunk@6119 89ea8834-ac86-4346-8a33-228a782c2dd0
-rwxr-xr-xphpBB/install/install_install.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 4ce0b27bfd..ad762daf0f 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1281,8 +1281,7 @@ class install_install extends module
}
}
- // This is a one off move of a single ACP module since the sort algorithm puts it in the wrong place
- // Manage Users should ideally be the first thing you see on the Users & groups tab
+ // Move some of the modules around since the code above will put them in the wrong place
if ($module_class == 'acp')
{
// Move main module 4 up...
@@ -1308,6 +1307,18 @@ class install_install extends module
$db->sql_freeresult($result);
$_module->move_module_by($row, 'move_up', 4);
+
+ // Move manage users screen module 4 up...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_name = 'users'
+ AND module_class = 'acp'
+ AND module_mode = 'overview'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $_module->move_module_by($row, 'move_up', 4);
}
// And now for the special ones
@@ -1556,6 +1567,13 @@ class install_install extends module
$db = new $sql_db();
$db->sql_return_on_error(true);
+ // Check that we actually have a database name before going any further.....
+ if ($dbms != 'sqlite' && $dbname === '')
+ {
+ $error[] = $lang['INST_ERR_DB_NO_NAME'];
+ return false;
+ }
+
// Try and connect ...
if (is_array($db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false)))
{