1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 15:45:34 +02:00

- 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
This commit is contained in:
Graham Eames 2006-06-23 20:02:16 +00:00
parent 16a40387f1
commit a27ce549bd

View File

@ -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)))
{