summaryrefslogtreecommitdiff
path: root/includes/variable.inc
diff options
context:
space:
mode:
authornatrak <>2001-10-20 11:24:52 +0000
committernatrak <>2001-10-20 11:24:52 +0000
commit6b4e1ec4753bff11443a0f3b52b21da2d166a5c4 (patch)
treecd6aadae1d41cb1ccb7d3b697979b3dc3aced90f /includes/variable.inc
parent1539d4f428adbf68a69f2c33103c0e4a80982d97 (diff)
downloadbrdo-6b4e1ec4753bff11443a0f3b52b21da2d166a5c4.tar.gz
brdo-6b4e1ec4753bff11443a0f3b52b21da2d166a5c4.tar.bz2
- modified the variable code so you can override site settings in the config file
by setting them in a $conf variable. This will let you host several domains off the same Drupal installation with the same databases with minor differences in settings. Note: the values can not be changed by users in a GET or POST string.
Diffstat (limited to 'includes/variable.inc')
-rw-r--r--includes/variable.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/variable.inc b/includes/variable.inc
index 2a1d91a37..511965e16 100644
--- a/includes/variable.inc
+++ b/includes/variable.inc
@@ -2,7 +2,11 @@
function variable_init($conf = array()) {
$result = db_query("SELECT * FROM variable");
- while ($variable = db_fetch_object($result)) $conf[$variable->name] = $variable->value;
+ while ($variable = db_fetch_object($result)) {
+ if (!isset($conf[$variable->name])) {
+ $conf[$variable->name] = $variable->value;
+ }
+ }
return $conf;
}