diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-05-20 13:51:40 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-05-20 13:51:40 +0000 |
commit | 20397ad3d9dad39670ed92923d2513bd89c7b0bb (patch) | |
tree | 1e16b41f8312007e0f0805c6db7c94813f5c05fb /includes/variable.inc | |
parent | 3fbd49d786e57ebde5736793a5050cda8796205d (diff) | |
download | brdo-20397ad3d9dad39670ed92923d2513bd89c7b0bb.tar.gz brdo-20397ad3d9dad39670ed92923d2513bd89c7b0bb.tar.bz2 |
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.
Diffstat (limited to 'includes/variable.inc')
-rw-r--r-- | includes/variable.inc | 10 |
1 files changed, 9 insertions, 1 deletions
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 |