aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.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/elgglib.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/elgglib.php')
-rw-r--r--engine/lib/elgglib.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index fb61b7d10..d7548b955 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -285,7 +285,7 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
}
// log warning
- elgg_log($error, 'WARNING');
+ elgg_log($error, 'NOTICE');
}
}
@@ -1372,8 +1372,21 @@ function sanitised() {
$save_vars = get_input('db_install_vars');
$result = "";
if ($save_vars) {
+ $rtn = db_check_settings($save_vars['CONFIG_DBUSER'],
+ $save_vars['CONFIG_DBPASS'],
+ $save_vars['CONFIG_DBNAME'],
+ $save_vars['CONFIG_DBHOST'] );
+ if ($rtn == FALSE) {
+ register_error(elgg_view("messages/sanitisation/dbsettings_error"));
+ register_error(elgg_view("messages/sanitisation/settings",
+ array( 'settings.php' => $result,
+ 'sticky' => $save_vars)));
+ return FALSE;
+ }
+
$result = create_settings($save_vars, dirname(dirname(__FILE__)) . "/settings.example.php");
+
if (file_put_contents(dirname(dirname(__FILE__)) . "/settings.php", $result)) {
// blank result to stop it being displayed in textarea
$result = "";