cvs: php-master-web /entry user-note.php /include note-reasons.inc /manage user-notes.php
| From: | Sean Coates | Date: | Sat, 25 Feb 2006 17:46:13 +0000 |
| Subject: | cvs: php-master-web /entry user-note.php /include note-reasons.inc /manage user-notes.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-30664@lists.php.net to get a copy of this message | ||
sean Sat Feb 25 17:46:13 2006 UTC
Added files:
/php-master-web/include note-reasons.inc
Modified files:
/php-master-web/entry user-note.php
/php-master-web/manage user-notes.php
Log:
consolidate note del reasons && use new short URLs
http://cvs.php.net/viewcvs.cgi/php-master-web/entry/user-note.php?r1=1.43&r2=1.44&diff_format=u
Index: php-master-web/entry/user-note.php
diff -u php-master-web/entry/user-note.php:1.43 php-master-web/entry/user-note.php:1.44
--- php-master-web/entry/user-note.php:1.43 Wed Feb 8 13:17:51 2006
+++ php-master-web/entry/user-note.php Sat Feb 25 17:46:13 2006
@@ -1,6 +1,7 @@
<?php
// ** alerts ** remove comment when alerts are on-line
//require_once 'alert_lib.inc';
+include_once 'note-reasons.inc';
$mailto = 'php-notes@lists.php.net';
$failto = 'jimw@php.net, alindeman@php.net';
@@ -129,16 +130,14 @@
$msg .= "\n----\n";
$msg .= "Manual Page -- http://www.php.net/manual/en/$sect.php\n";
- $msg .= "Edit -- http://master.php.net/manage/user-notes.php?action=edit+$new_id\n";
+ $msg .= "Edit -- http://master.php.net/note/edit/$new_id\n";
//$msg .= "Approve -- http://master.php.net/manage/user-notes.php?action=approve+$new_id&report=yes\n";
- $msg .= "Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+$new_id&report=yes&reason=added+to+the+manual\n";
- $msg .= "Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+$new_id&report=yes&reason=bad+code\n";
- $msg .= "Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+$new_id&report=yes&reason=spam\n";
- $msg .= "Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+$new_id&report=yes&reason=useless\n";
- $msg .= "Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+$new_id&report=yes&reason=non-english\n";
- $msg .= "Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+$new_id&report=yes&reason=already+in+docs\n";
- $msg .= "Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+$new_id&report=yes\n";
- $msg .= "Reject -- http://master.php.net/manage/user-notes.php?action=reject+$new_id&report=yes\n";
+ foreach ($note_del_reasons AS $reason) {
+ $msg .= "Del: "
+ . str_pad($reason, $note_del_reasons_pad)
+ . "-- http://master.php.net/note/delete/$new_id/"
. urlencode($reason) ."\n";
+ }
+ $msg .= "Reject -- http://master.php.net/reject/$new_id&report=yes\n";
$msg .= "Search -- http://master.php.net/manage/user-notes.php\n";
# make sure we have a return address.
if (!$user) $user = "php-general@lists.php.net";
http://cvs.php.net/viewcvs.cgi/php-master-web/manage/user-notes.php?r1=1.58&r2=1.59&diff_format=u
Index: php-master-web/manage/user-notes.php
diff -u php-master-web/manage/user-notes.php:1.58 php-master-web/manage/user-notes.php:1.59
--- php-master-web/manage/user-notes.php:1.58 Thu Sep 15 14:30:32 2005
+++ php-master-web/manage/user-notes.php Sat Feb 25 17:46:13 2006
@@ -1,10 +1,11 @@
<?php
-// $Id: user-notes.php,v 1.58 2005/09/15 14:30:32 sean Exp $
+// $Id: user-notes.php,v 1.59 2006/02/25 17:46:13 sean Exp $
// Force login before action can be taken
include_once 'login.inc';
include_once 'functions.inc';
include_once 'email-validation.inc';
+include_once 'note-reasons.inc';
//require_once 'alert_lib.inc'; // remove comment if alerts are needed
define("NOTES_MAIL", "php-notes@lists.php.net");
@@ -77,15 +78,12 @@
hsc($row['user']),"</span><br />",
"Note id: $id<br />\n",
"<a href=\"http://www.php.net/manual/en/{$row['sect']}.php\">http://www.php.net/manual/en/{$row['sect']}.php</a><br
/>\n",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=edit+$id\"
target=\"_blank\">Edit Note</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=delete+$id&reason=integrated\"
target=\"_blank\">Delete Note: Integrated in the manual</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=delete+$id&reason=useless\"
target=\"_blank\">Delete Note: useless</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=delete+$id&reason=bad+code\"
target=\"_blank\">Delete Note: bad code</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=delete+$id&reason=spam\"
target=\"_blank\">Delete Note: spam</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=delete+$id&reason=non-english\"
target=\"_blank\">Delete Note: non-english</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=delete+$id&reason=already+in+docs\"
target=\"_blank\">Delete Note: already in docs</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=delete+$id\"
target=\"_blank\">Delete Note: other reason</a><br />",
- "<a href=\"http://master.php.net/manage/user-notes.php?action=reject+$id\"
target=\"_blank\">Reject Note</a>",
+ "<a href=\"http://master.php.net/note/edit/$id\"
target=\"_blank\">Edit Note</a><br />";
+ foreach ($note_del_reasons AS $reason => $text) {
+ echo '<a href="http://master.php.net/note/delete/', $id,
'/', urlencode($reason), '">', 'Delete Note: ',
htmlspecialchars($text), "</a><br />\n";
+ }
+ echo "<a href=\"http://master.php.net/note/delete/$id\"
target=\"_blank\">Delete Note: other reason</a><br />",
+ "<a href=\"http://master.php.net/note/reject/reject/$id\"
target=\"_blank\">Reject Note</a>",
"</p>",
"<hr />";
}
@@ -395,6 +393,7 @@
// Send out a mail to the note submitter, with an envelope sender ignoring bounces
function note_mail_user($mailto, $subject, $message)
{
+return;
$mailto = clean_antispam($mailto);
if (is_emailable_address($mailto)) {
mail(
@@ -423,6 +422,7 @@
// some action is performed on a user note.
function note_mail_on_action($user, $id, $subject, $body)
{
+return;
mail(NOTES_MAIL, $subject, $body, "From: $user@php.net\r\nIn-Reply-To:
<note-$id@php.net>");
}
http://cvs.php.net/viewcvs.cgi/php-master-web/include/note-reasons.inc?view=markup&rev=1.1
Index: php-master-web/include/note-reasons.inc
+++ php-master-web/include/note-reasons.inc
<?php
/* $Id: */
// stock reasons for deleting notes
$note_del_reasons = array(
'integrated',
'useless',
'bad code',
'spam',
'non-english',
'in docs',
);
$note_del_reasons_pad = 0;
foreach ($note_del_reasons AS $r) {
if (($l = strlen($r)) > $note_del_reasons_pad) {
$note_del_reasons_pad = $l;
}
}
++$note_del_reasons_pad;
?>