From 7e721f6b92ea8db2854b2ad457879c7891bf12a8 Mon Sep 17 00:00:00 2001 From: azaozz Date: Sat, 6 Sep 2008 05:59:56 +0000 Subject: [PATCH] Ignore comment_max_links option when zero, props tellyworth, fixes #7699 git-svn-id: http://svn.automattic.com/wordpress/trunk@8833 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 46c31c84b4..61b5462e69 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -45,7 +45,7 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $ if ( 1 == get_option('comment_moderation') ) return false; // If moderation is set to manual - if ( preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", $comment, $out) >= get_option('comment_max_links') ) + if ( get_option('comment_max_links') && preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", $comment, $out) >= get_option('comment_max_links') ) return false; // Check # of external links $mod_keys = trim(get_option('moderation_keys'));