From 20397ad3d9dad39670ed92923d2513bd89c7b0bb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 20 May 2001 13:51:40 +0000 Subject: CHANGES - Redid settings.module and even renamed it to conf.module. * Settings are now grouped in basic categories like "system settings", "module settings" and "filters". * Added new settings to make Drupal easier to configure and to make some aspects like the watchdog scale better. - Renamed includes/settings.php to includes/conf.php. - Added filter support to conf.module and introduced filter hooks so modules can implement and export new filters. Example filters are an HTML filter (implemented), a profanity filter, an url converter, ASCII smileys to images filter and so on ... - Reworked the check_* functions: user contributed content/input is only verified and filtered once in its lifespan. NOTES - Altough this is a large commit, no database changes are required. --- includes/variable.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'includes/variable.inc') diff --git a/includes/variable.inc b/includes/variable.inc index 5f47c03e6..618c7f4ce 100644 --- a/includes/variable.inc +++ b/includes/variable.inc @@ -32,7 +32,7 @@ function variable_get($name, $default, $object = 0) { case "expire_threshold": return handler_expire_threshold($object, $default); default: - return ($conf[$name] ? $conf[$name] : $default); + return $conf[$name] ? $conf[$name] : $default; } } @@ -45,4 +45,12 @@ function variable_set($name, $value) { $conf[$name] = $value; } +function variable_del($name) { + global $conf; + + db_query("DELETE FROM variable WHERE name = '". check_input($name) ."'"); + + $conf[$name] = ""; +} + ?> \ No newline at end of file -- cgit v1.2.3