bug 471 fixed: quote in tags

svn merge from trunk into branch-1.6


git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1488 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
nikrou
2006-07-21 13:47:50 +00:00
parent 19fa4408c8
commit fdc7bdbd3b
2 changed files with 39 additions and 12 deletions
+34
View File
@@ -460,6 +460,40 @@ function format_date($date, $type = 'us', $show_time = false)
return $formated_date;
}
function pwg_stripslashes($value)
{
if (get_magic_quotes_gpc())
{
$value = stripslashes($value);
}
return $value;
}
function pwg_addslashes($value)
{
if (!get_magic_quotes_gpc())
{
$value = addslashes($value);
}
return $value;
}
function pwg_quotemeta($value)
{
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
if (function_exists('mysql_real_escape_string'))
{
$value = mysql_real_escape_string($value);
}
else
{
$value = mysql_escape_string($value);
}
return $value;
}
function pwg_query($query)
{
global $conf,$page,$debug,$t2;