Work around for servers where PHP magic_quotes_gpc is disabled

svn path=/trunk/boinc/; revision=13581
This commit is contained in:
Rytis Slatkevičius 2007-09-12 18:10:49 +00:00
parent ae628d1fcd
commit b8c0ef8815
1 changed files with 6 additions and 0 deletions

View File

@ -614,6 +614,9 @@ function get_str($name, $optional=false) {
if (!$x && !$optional) {
error_page("missing or bad parameter: $name");
}
if (get_magic_quotes_gpc() == 0) {
$x = addslashes($x);
}
return $x;
}
@ -632,6 +635,9 @@ function post_str($name, $optional=false) {
if (!$x && !$optional) {
error_page("missing or bad parameter: $name");
}
if (get_magic_quotes_gpc() == 0) {
$x = addslashes($x);
}
return $x;
}