cvs: php-bugs-web / bug.php
| From: | jim winstead | Date: | Tue, 19 Feb 2002 23:50:28 +0000 |
| Subject: | cvs: php-bugs-web / bug.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-8765@lists.php.net to get a copy of this message | ||
jimw Tue Feb 19 18:50:28 2002 EDT
Modified files:
/php-bugs-web bug.php
Log:
prevent 'reported by' being noted as changed when someone adds a comment. (it
wasn't really being changed, but the email indicated that it was.)
Index: php-bugs-web/bug.php
diff -u php-bugs-web/bug.php:1.28 php-bugs-web/bug.php:1.29
--- php-bugs-web/bug.php:1.28 Sat Feb 9 20:36:41 2002
+++ php-bugs-web/bug.php Tue Feb 19 18:50:27 2002
@@ -51,7 +51,7 @@
$errors = array();
if ($in && $edit == 3) {
- if (!preg_match("/[.\\w+-]+@[.\\w-]+\\.\\w{2,}/i",$in['email'])) {
+ if (!preg_match("/[.\\w+-]+@[.\\w-]+\\.\\w{2,}/i",$in['commentemail'])) {
$errors[] = "You must provide a valid email address.";
}
@@ -62,10 +62,10 @@
if (!$errors) {
$query = "INSERT INTO bugdb_comments (bug,email,ts,comment) VALUES"
- . " ('$id','$in[email]',NOW(),'$ncomment')";
+ . "
('$id','$in[commentemail]',NOW(),'$ncomment')";
$success = @mysql_query($query);
}
- $from = stripslashes($in['email']);
+ $from = stripslashes($in['commentemail']);
}
elseif ($in && $edit == 2) {
if (!$bug[passwd] || $bug[passwd] != stripslashes($pw)) {
@@ -340,7 +340,7 @@
<table>
<tr>
<th>Your email address:</th>
- <td><input type="text" size="40" maxlength="40"
name="in[email]" value="<?php echo clean($in['email'])?>"
/></td>
+ <td><input type="text" size="40" maxlength="40"
name="in[commentemail]" value="<?php echo
clean($in['commentemail'])?>" /></td>
<td><input type="hidden" name="id" value="<?php echo
$id?>" /><input type="hidden" name="edit" value="<?php
echo $edit?>" /><input type="submit" value="Submit"
/></td>
</tr>
</table>