com web/bugs: Clearer error message when rejecting comment as potential SPAM: www/bug.php
| From: | Sara Golemon | Date: | Mon, 12 Dec 2016 17:16:59 +0000 |
| Subject: | com web/bugs: Clearer error message when rejecting comment as potential SPAM: www/bug.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25424@lists.php.net to get a copy of this message | ||
Commit: 0eaa68643bb16b90cbd3e0f06a487025fd9c0b0b
Author: Teo <matteosistisette@gmail.com> Tue, 25 Aug 2015 22:30:08 +0200
Committer: Sara Golemon <pollita@php.net> 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