diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-10-31 19:34:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-10-31 19:34:03 +0000 |
commit | ec3326679595953650e76308daac2182b7d628b9 (patch) | |
tree | 3ab072825ef580887f42cc2355f77b064c1b320a /includes/common.inc | |
parent | f35eb376737d9df40adb9cd1821313b98c6bda52 (diff) | |
download | brdo-ec3326679595953650e76308daac2182b7d628b9.tar.gz brdo-ec3326679595953650e76308daac2182b7d628b9.tar.bz2 |
- Improvement: made it possible to disable the comment controls and reworded some of the configuration settings.
- Improvement: removed a left-over from Drupal 4.2.0 (dead code).
- Improvement: replaced hard-coded XHTML around the XML icons with class="xml-icon".
- Improvement: removed the custom navigation menus shown at the top of the "user information page" and integrated them in the new navigation block. The "my account" link in the navigation menu will unfold. Also removed the "delete account" link/functionality (for now).
- Improvement: fix for "magic quotes" settings. Patch by Steven. I also removed check_php_settings().
- Improvement: block themability improvements. Modified patch from Ax and Steve/CodeMonkeyX.
- Fixed bug #2617: editing user information does not work. Patch by Kjartan.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc index 8ebbc1c26..435318165 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -81,12 +81,25 @@ function throttle($type, $rate) { } } -function check_php_setting($name, $value) { - if (ini_get($name) != $value) { - print "<p>Note that the value of PHP's configuration option <code><b>$name</b></code> is incorrect. It should be set to '$value' for Drupal to work properly. Either configure your webserver to support <code>.htaccess</code> files so Drupal's <code>.htaccess</code> file can set it to the proper value, or edit your <code>php.ini</code> file directly. This message will automatically dissapear when the problem has been fixed.</p>"; +function _fix_gpc_magic_array(&$items) { + foreach ($items as $k => $i) { + if (is_array($i)) _fix_gpc_magic_array($items[$k]); + else $items[$k] = stripslashes($i); } } +function fix_gpc_magic() { + static $fixed = false; + if ($fixed) return; + if (ini_get("magic_quotes_gpc") == 0) return; + + _fix_gpc_magic_array($_GET); + _fix_gpc_magic_array($_POST); + _fix_gpc_magic_array($_COOKIE); + + $fixed = true; +} + function arg($index) { static $arguments; |