cvs: php-master-web /manage user-notes.php
| From: | Gabor Hojtsy | Date: | Wed, 26 May 2004 10:15:09 +0000 |
| Subject: | cvs: php-master-web /manage user-notes.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-24738@lists.php.net to get a copy of this message | ||
goba Wed May 26 06:15:09 2004 EDT
Modified files:
/php-master-web/manage user-notes.php
Log:
enable admins to edit manuals ids of notes - patch by Jakub Vrana
http://cvs.php.net/diff.php/php-master-web/manage/user-notes.php?r1=1.38&r2=1.39&ty=u
Index: php-master-web/manage/user-notes.php
diff -u php-master-web/manage/user-notes.php:1.38 php-master-web/manage/user-notes.php:1.39
--- php-master-web/manage/user-notes.php:1.38 Mon Feb 9 11:13:59 2004
+++ php-master-web/manage/user-notes.php Wed May 26 06:15:09 2004
@@ -211,11 +211,7 @@
//$mailto .= get_emails_for_sect($row["sect"]);
mail($mailto,"note $row[id] ".($action == "reject" ?
"rejected" : "deleted")." from $row[sect] by $user","Note
Submitter: $row[user]\n\n----\n\n".$row['note'],"From:
$user@php.net\r\nIn-Reply-To: <note-$id@php.net>");
if ($action == 'reject') {
- $email = clean_antispam($row['user']);
- if (is_emailable_address($email)) {
- # use an envelope sender that lets us ignore bounces
- mail($email,"note $row[id] rejected and deleted from $row[sect] by notes editor
$user",$reject_text."\n\n----- Copy of your note below
-----\n\n".$row['note'],"From: webmaster@php.net",
'-fbounces-ignored@php.net');
- }
+ mail_user($row['user'], "note $row[id] rejected and deleted from
$row[sect] by notes editor $user",$reject_text."\n\n----- Copy of your note below
-----\n\n".$row['note']);
}
}
@@ -250,13 +246,17 @@
}
$email = isset($email) ? $email : addslashes($row['user']);
+ $sect = isset($sect) ? $sect : addslashes($row['sect']);
if (isset($note) && $action == "edit") {
- if (@mysql_query("UPDATE note SET
note='$note',user='$email',updated=NOW() WHERE id=$id")) {
+ if (@mysql_query("UPDATE note SET
note='$note',user='$email',sect='$sect',updated=NOW() WHERE
id=$id")) {
// ** alerts **
//$mailto .= get_emails_for_sect($row["sect"]);
mail($mailto,"note $row[id] modified in $row[sect] by
$user",stripslashes($note)."\n\n--was--\n$row[note]\n\nhttp://www.php.net/manual/en/$row[sect].php","From:
$user@php.net\r\nIn-Reply-To: <note-$id@php.net>");
+ if (addslashes($row["sect"]) != $sect) {
+ mail_user($email, "note $id moved from $row[sect] to $sect by notes editor
$user", "----- Copy of your note below -----\n\n".stripslashes($note));
+ }
header('Location: user-notes.php?id=' . $id . '&was=' . $action);
exit;
}
@@ -279,6 +279,10 @@
<input type="hidden" name="id" value="<?php echo $id;?>"
/>
<table>
<tr>
+ <th align="right">Section:</th>
+ <td><input type="text" name="sect" value="<?php echo
clean($sect);?>" size="30" maxlength="80" /></td>
+ </tr>
+ <tr>
<th align="right">email:</th>
<td><input type="text" name="email" value="<?php echo
clean($email);?>" size="30" maxlength="80" /></td>
</tr>
@@ -353,4 +357,13 @@
if ($return) { return $highlighted; }
else { echo $highlighted; }
+}
+
+function mail_user($email, $subject, $message)
+{
+ $email = clean_antispam($email);
+ if (is_emailable_address($email)) {
+ # use an envelope sender that lets us ignore bounces
+ mail($email,$subject,$message,"From: webmaster@php.net",
'-fbounces-ignored@php.net');
+ }
}