cvs: php-bugs-web /include functions.inc prepend.inc

From: Date: Fri, 22 Apr 2005 13:17:38 +0000
Subject: cvs: php-bugs-web /include functions.inc prepend.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-27992@lists.php.net to get a copy of this message
dufuz Fri Apr 22 09:17:38 2005 EDT Modified files: /php-bugs-web/include functions.inc prepend.inc Log: Now the CAPTCHA is only triggered in report.php and also adding a DEVBOX constant so emails are not sent out unless DEVBOX is set to false. # The era of the CAPTCHA ;) http://cvs.php.net/diff.php/php-bugs-web/include/functions.inc?r1=1.154&r2=1.155&ty=u Index: php-bugs-web/include/functions.inc diff -u php-bugs-web/include/functions.inc:1.154 php-bugs-web/include/functions.inc:1.155 --- php-bugs-web/include/functions.inc:1.154 Thu Apr 21 06:35:46 2005 +++ php-bugs-web/include/functions.inc Fri Apr 22 09:17:37 2005 @@ -344,29 +344,31 @@ } else { /* status did not change and not comment */ $subj = "#{$bug['id']} [{$tla[$bug['status']]}]: "; } - - # the user gets sent mail with an envelope sender that ignores bounces - @mail($bug['email'], - "Bug " . rinse($subj) . txfield('sdesc'), - $user_text, - "From: PHP Bug Database <$mailfrom>\n". - "X-PHP-Bug: $bug[id]\n". - "In-Reply-To: <bug-$bug[id]@bugs.php.net>", - "-fbounces-ignored@php.net"); - # but we go ahead and let the default sender get used for the list - @mail($mailto, - rinse($subj) . txfield('sdesc'), - $dev_text, - "From: $from\n". - "X-PHP-Bug: $bug[id]\n". - "X-PHP-Version: " . stripslashes((($edit != 3) ? $in['php_version'] : $bug['php_version'])) . "\n" . - "X-PHP-Category: " . stripslashes((($edit != 3) ? $in['bug_type'] : $bug['bug_type'])) . "\n" . - "X-PHP-OS: " . stripslashes((($edit != 3) ? $in['php_os'] : $bug['php_os'])) . "\n" . - "X-PHP-Status: " . stripslashes($new_status) . "\n" . - "X-PHP-Old-Status: " . stripslashes($old_status) . "\n" . - "X-PHP-Reported-By: " . stripslashes(spam_protect(rinse($bug['email']))) . "\n" . - "X-PHP-Updated-By: " . stripslashes($from_addr) . "\n" . - "In-Reply-To: <bug-$bug[id]@bugs.php.net>"); + + if (!DEVBOX) { + # the user gets sent mail with an envelope sender that ignores bounces + @mail($bug['email'], + "Bug " . rinse($subj) . txfield('sdesc'), + $user_text, + "From: PHP Bug Database <$mailfrom>\n". + "X-PHP-Bug: $bug[id]\n". + "In-Reply-To: <bug-$bug[id]@bugs.php.net>", + "-fbounces-ignored@php.net"); + # but we go ahead and let the default sender get used for the list + @mail($mailto, + rinse($subj) . txfield('sdesc'), + $dev_text, + "From: $from\n". + "X-PHP-Bug: $bug[id]\n". + "X-PHP-Version: " . stripslashes((($edit != 3) ? $in['php_version'] : $bug['php_version'])) . "\n" . + "X-PHP-Category: " . stripslashes((($edit != 3) ? $in['bug_type'] : $bug['bug_type'])) . "\n" . + "X-PHP-OS: " . stripslashes((($edit != 3) ? $in['php_os'] : $bug['php_os'])) . "\n" . + "X-PHP-Status: " . stripslashes($new_status) . "\n" . + "X-PHP-Old-Status: " . stripslashes($old_status) . "\n" . + "X-PHP-Reported-By: " . stripslashes(spam_protect(rinse($bug['email']))) . "\n" . + "X-PHP-Updated-By: " . stripslashes($from_addr) . "\n" . + "In-Reply-To: <bug-$bug[id]@bugs.php.net>"); + } } /* if a developer assigns someone else, let that other person know about it */ @@ -375,13 +377,15 @@ $unknowing_victim = $in['assign'] . '@php.net'; - @mail($unknowing_victim, - rinse($subj) . txfield('sdesc'), - wordwrap($unknowing_victim . ' you have just been assigned to this bug by ' . $from . "\n\n") . - $dev_text, - "From: $from\n". - "X-PHP-Bug: $bug[id]\n". - "In-Reply-To: <bug-$bug[id]@bugs.php.net>"); + if (!DEVBOX) { + @mail($unknowing_victim, + rinse($subj) . txfield('sdesc'), + wordwrap($unknowing_victim . ' you have just been assigned to this bug by ' . $from . "\n\n") . + $dev_text, + "From: $from\n". + "X-PHP-Bug: $bug[id]\n". + "In-Reply-To: <bug-$bug[id]@bugs.php.net>"); + } } } @@ -489,6 +493,10 @@ $errors[] = "You must supply a password for this bug report."; } + if ($initial && !validate_captcha()) { + $errors[] = 'Incorrect CAPTCHA'; + } + return $errors; } http://cvs.php.net/diff.php/php-bugs-web/include/prepend.inc?r1=1.3&r2=1.4&ty=u Index: php-bugs-web/include/prepend.inc diff -u php-bugs-web/include/prepend.inc:1.3 php-bugs-web/include/prepend.inc:1.4 --- php-bugs-web/include/prepend.inc:1.3 Fri Feb 1 15:25:58 2002 +++ php-bugs-web/include/prepend.inc Fri Apr 22 09:17:37 2005 @@ -1,4 +1,6 @@ <?php +define('DEVBOX', false); + require_once 'layout.inc'; require_once 'functions.inc'; -require_once 'resolve.inc'; +require_once 'resolve.inc'; \ No newline at end of file

« previous php.mirrors (#27992) next »