diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-03 13:22:57 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-03 13:22:57 +0000 |
commit | ca4b43c0c94936a2592cb8a86a0631e4cd26d7af (patch) | |
tree | 9d55380970dc700b6e79ca2921eb589029913d2c /engine/lib | |
parent | 6263c4160e6067c4074d349e67f990c6e8130ddf (diff) | |
download | elgg-ca4b43c0c94936a2592cb8a86a0631e4cd26d7af.tar.gz elgg-ca4b43c0c94936a2592cb8a86a0631e4cd26d7af.tar.bz2 |
Installation issues: fixed
git-svn-id: https://code.elgg.org/elgg/trunk@57 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/configuration.php | 3 | ||||
-rw-r--r-- | engine/lib/database.php | 18 |
2 files changed, 9 insertions, 12 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index 66b36bf63..d60b7b8f3 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -39,6 +39,9 @@ $CONFIG->wwwroot .= str_replace($_SERVER['DOCUMENT_ROOT'],"",$CONFIG->path);
}
+ if (empty($CONFIG->url))
+ $CONFIG->url = $CONFIG->wwwroot;
+
if (empty($CONFIG->sitename))
$CONFIG->sitename = "New Elgg site";
diff --git a/engine/lib/database.php b/engine/lib/database.php index fab73025e..1d78ac310 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -264,11 +264,12 @@ $tables = array();
- if (is_array($result)) {
+ if (is_array($result) && !empty($result)) {
foreach($result as $row) {
- foreach($row as $element) {
- $tables[] = $element;
- }
+ if (is_array($row) && !empty($row))
+ foreach($row as $element) {
+ $tables[] = $element;
+ }
}
}
@@ -306,13 +307,6 @@ $statement = str_replace("prefix_",$CONFIG->dbprefix,$statement);
if (!empty($statement)) {
$result = update_data($statement);
- if ($result == false) {
- $error = mysql_error();
- $error = trim($error);
- if (!empty($error)) {
- $errors[] = $error;
- }
- }
}
}
if (!empty($errors)) {
@@ -340,6 +334,6 @@ // Stuff for initialisation
- register_event_handler('init','system','init_db',0);
+ register_event_handler('boot','system','init_db',0);
?>
\ No newline at end of file |