aboutsummaryrefslogtreecommitdiff
path: root/www/inc/www.class.inc.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-18 11:44:58 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-18 11:44:58 -0200
commit9334f7e48133c3a2309ed8dc39182cbc486570b6 (patch)
tree7d2aa4f0965d3b18ceff91f47712aca6787c1a4a /www/inc/www.class.inc.php
parent9440f6530bb5809e36d4220062fce040cb00f01c (diff)
downloadoriginal-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.php4
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();