Jump to content

[TIPS] blacklist words


Recommended Posts

there a blacklist word on Db.php to filter the reserved words in mysql. how about just quote the word so we still can input the words instead blacklisted it.. ive modify DB.php a little....

from :

public static function blacklist(&$query)
{
   return eregi(self::$_blacklist, $query) ? true : false;
}



to :

public static function blacklist(&$query)
{
   return eregi_replace( "(self::$_blacklist)", "`\\1`", $query);
}




:: cmiiw ::

Link to comment
Share on other sites

×
×
  • Create New...