Changeset 1487 for trunk/include


Ignore:
Timestamp:
Jul 21, 2006, 3:44:22 PM (18 years ago)
Author:
nikrou
Message:

bug 471 fixed: quote in tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r1400 r1487  
    461461}
    462462
     463function pwg_stripslashes($value)
     464{
     465  if (get_magic_quotes_gpc())
     466  {
     467    $value = stripslashes($value);
     468  }
     469  return $value;
     470}
     471
     472function pwg_addslashes($value)
     473{
     474  if (!get_magic_quotes_gpc())
     475  {
     476    $value = addslashes($value);
     477  }
     478  return $value;
     479}
     480
     481function pwg_quotemeta($value)
     482{
     483  if (get_magic_quotes_gpc()) {
     484    $value = stripslashes($value);
     485  }
     486  if (function_exists('mysql_real_escape_string'))
     487  {
     488    $value = mysql_real_escape_string($value);
     489  }
     490  else
     491  {
     492    $value = mysql_escape_string($value);
     493  }
     494  return $value;
     495}
     496
    463497function pwg_query($query)
    464498{
Note: See TracChangeset for help on using the changeset viewer.