Incorrect variable name used for parameter.
[moodle-linuxchix.git] / mod / wiki / ewiki / fragments / strip_wonderful_slashes.php
blobca858c44ea7acb613ee39ec85af32e234acc0936
1 <?php
3 /*
5 this strips all "\" from $_REQUEST and
6 disables the runtime garbaging as well
8 just include() it before ewiki.php
9 and everythink should work fine
12 for Apache+mod_php you should however rather use the
13 [.htaccess] PHP reconfiguration trick:
14 php_flag magic_quotes_gpc off
15 php_flag magic_quotes_runtime off
20 #-- this is very evil too
21 set_magic_quotes_runtime(0);
24 #-- strip \'s only if the variables garbaging is really enabled
25 if (get_magic_quotes_gpc()) {
27 $superglobals = array(
28 "_REQUEST",
29 "_GET",
30 "_POST",
31 "_COOKIE",
32 "_ENV",
33 "_SERVER"
36 foreach ($superglobals as $AREA) {
38 foreach ($GLOBALS[$AREA] as $name => $value) {
40 if (!is_array($value)) {
41 $GLOBALS[$AREA][$name] = stripslashes($value);