diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-02-18 11:44:58 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-02-18 11:44:58 -0200 |
commit | 9334f7e48133c3a2309ed8dc39182cbc486570b6 (patch) | |
tree | 7d2aa4f0965d3b18ceff91f47712aca6787c1a4a /www/inc/www.class.inc.php | |
parent | 9440f6530bb5809e36d4220062fce040cb00f01c (diff) | |
download | original-9334f7e48133c3a2309ed8dc39182cbc486570b6.tar.gz original-9334f7e48133c3a2309ed8dc39182cbc486570b6.tar.bz2 |
Avoiding deprecation notices (3)
Diffstat (limited to 'www/inc/www.class.inc.php')
-rw-r--r-- | www/inc/www.class.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/www/inc/www.class.inc.php b/www/inc/www.class.inc.php index bb61a5c..312ba50 100644 --- a/www/inc/www.class.inc.php +++ b/www/inc/www.class.inc.php @@ -289,14 +289,14 @@ class C_www { $comment_data = stripslashes(strip_tags($comment_data,$allowedTags)); // thanks google: // http://www.google.com/googleblog/2005/01/preventing-comment-spam.html - $comment_data = eregi_replace("<a ","<a rel=\"nofollow\" ",$comment_data); + $comment_data = preg_replace("/<a ","<a rel=\"nofollow\" /i",$comment_data); #further comment spam $comment_blacklist = array("pharmacy", "poker", "Viagra"); foreach($comment_blacklist as $blackword) { $check = addslashes($blackword); - if (eregi($check,$comment_data)) { + if (preg_match("/$check/i",$comment_data)) { #write error message $this->error( __('No comment spam'), __('Your comment includes blacklisted word') . __('No comment spam') ); $this->footer(); |