From 1d33c3fd07fbfa41359af0e99079f57f022e7124 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 22 Mar 2010 16:56:55 +0000 Subject: Merged 1.7 bugfixes back into core. (5376:HEAD). git-svn-id: http://code.elgg.org/elgg/trunk@5471 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/install.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'engine/lib/install.php') diff --git a/engine/lib/install.php b/engine/lib/install.php index 1b363b950..e2b0c5251 100644 --- a/engine/lib/install.php +++ b/engine/lib/install.php @@ -44,6 +44,29 @@ function validate_platform() { return true; } +/** + * Confirm the settings for the database + * + * @param string $user + * @param string $password + * @param string $dbname + * @param string $host + * @return bool + */ +function db_check_settings($user, $password, $dbname, $host) { + $mysql_dblink = mysql_connect($host, $user, $password, true); + if ($mysql_dblink == FALSE) { + return $FALSE; + } + + $result = mysql_select_db($dbname, $mysql_dblink); + + mysql_close($mysql_dblink); + + return $result; +} + + /** * Returns whether or not the database has been installed * -- cgit v1.2.3