From 6b4e1ec4753bff11443a0f3b52b21da2d166a5c4 Mon Sep 17 00:00:00 2001 From: natrak <> Date: Sat, 20 Oct 2001 11:24:52 +0000 Subject: - 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. --- includes/variable.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'includes/variable.inc') 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; } -- cgit v1.2.3