aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/install.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-22 16:56:55 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-22 16:56:55 +0000
commit1d33c3fd07fbfa41359af0e99079f57f022e7124 (patch)
tree7c8a11ab79801d4545aa8ca6ec8be1f231b2b287 /engine/lib/install.php
parenta140ef9c53edb2e249eab2eafccc6eb8c0952dab (diff)
downloadelgg-1d33c3fd07fbfa41359af0e99079f57f022e7124.tar.gz
elgg-1d33c3fd07fbfa41359af0e99079f57f022e7124.tar.bz2
Merged 1.7 bugfixes back into core. (5376:HEAD).
git-svn-id: http://code.elgg.org/elgg/trunk@5471 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/install.php')
-rw-r--r--engine/lib/install.php23
1 files changed, 23 insertions, 0 deletions
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
@@ -45,6 +45,29 @@ function validate_platform() {
}
/**
+ * 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
*
* @return true|false Whether the database has been installed