Commit: 0eaa68643bb16b90cbd3e0f06a487025fd9c0b0b Author: Teo <[email protected]> Tue, 25 Aug 2015 22:30:08 +0200 Committer: Sara Golemon <[email protected]> Mon, 12 Dec 2016 09:16:59 -0800 Parents: 21f5fd3484d763be5a53a354d0253a1c8f7b2f2b Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=0eaa68643bb16b90cbd3e0f06a487025fd9c0b0b Log: Clearer error message when rejecting comment as potential SPAM Changed paths: M www/bug.php Diff: diff --git a/www/bug.php b/www/bug.php index c3635d2..30ee4d4 100644 --- a/www/bug.php +++ b/www/bug.php @@ -7,6 +7,8 @@ require_once '../include/prepend.php'; // Start session session_start(); +define('SPAM_REJECT_MESSAGE', 'Your comment looks like SPAM by its content. Please consider rewording.'); + // Handle preview if (isset($_REQUEST['id']) && $_REQUEST['id'] == 'preview') { $bug_id = 'PREVIEW'; @@ -208,7 +210,7 @@ if (isset($_POST['ncomment']) && !isset($_POST['preview']) && $edit == 3) { // primitive spam detection if (is_spam($ncomment)) { - $errors[] = "Please do not SPAM our bug system."; + $errors[] = SPAM_REJECT_MESSAGE; } if (is_spam($_POST['in']['commentemail'])) { @@ -246,7 +248,7 @@ if (isset($_POST['ncomment']) && !isset($_POST['preview']) && $edit == 3) { // primitive spam detection if (is_spam($ncomment)) { - $errors[] = "Please do not SPAM our bug system."; + $errors[] = SPAM_REJECT_MESSAGE; } $from = $_POST['in']['commentemail']; @@ -296,7 +298,7 @@ if (isset($_POST['ncomment']) && !isset($_POST['preview']) && $edit == 3) { // primitive spam detection if ($ncomment && is_spam($ncomment)) { - $errors[] = "Please do not SPAM our bug system."; + $errors[] = SPAM_REJECT_MESSAGE; } if (!empty($_POST['in']['email']) && @@ -363,7 +365,7 @@ if (isset($_POST['ncomment']) && !isset($_POST['preview']) && $edit == 3) { // primitive spam detection if (is_spam($ncomment)) { - $errors[] = "Please do not SPAM our bug system."; + $errors[] = SPAM_REJECT_MESSAGE; } } elseif (isset($_POST['in']) && is_array($_POST['in']) && !isset($_POST['preview']) && $edit == 1) { @@ -389,7 +391,7 @@ if (isset($_POST['ncomment']) && !isset($_POST['preview']) && $edit == 3) { // primitive spam detection if ($ncomment && is_spam($ncomment)) { - $errors[] = "Please do not SPAM our bug system."; + $errors[] = SPAM_REJECT_MESSAGE; } // Just trusted dev can set CVE-ID -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
