cvs: pearweb /public_html/bugs bug-pwd-finder.php bug.php report.php /public_html/bugs/include functions.inc

From: Date: Tue, 26 Oct 2004 11:28:38 +0000
Subject: cvs: pearweb /public_html/bugs bug-pwd-finder.php bug.php report.php /public_html/bugs/include functions.inc
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-1147@lists.php.net to get a copy of this message
dufuz Tue Oct 26 07:28:38 2004 EDT Modified files: /pearweb/public_html/bugs/include functions.inc /pearweb/public_html/bugs bug.php bug-pwd-finder.php report.php Log: now all email links and such can be changed from one places, functions.inc that is x.php.net can be changed with $site, also $siteBig was added, to have the value of uppercase of the $site, this change should make it alot easier task to keep pear and pecl bug system in sync.

http://cvs.php.net/diff.php/pearweb/public_html/bugs/include/functions.inc?r1=1.68&r2=1.69&ty=u Index: pearweb/public_html/bugs/include/functions.inc diff -u pearweb/public_html/bugs/include/functions.inc:1.68 pearweb/public_html/bugs/include/functions.inc:1.69 --- pearweb/public_html/bugs/include/functions.inc:1.68 Mon Oct 4 16:24:50 2004 +++ pearweb/public_html/bugs/include/functions.inc Tue Oct 26 07:28:38 2004 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: functions.inc,v 1.68 2004/10/04 20:24:50 dufuz Exp $ + * @version $Id: functions.inc,v 1.69 2004/10/26 11:28:38 dufuz Exp $ */ @@ -28,6 +28,7 @@ // For distinguishing this site from PECL $site = 'pear'; +$siteBig = 'PEAR'; // used in mail_bug_updates(), below, and class for search results $tla = array( @@ -603,7 +604,7 @@ */ function mail_bug_updates($bug, $in, $from, $ncomment, $edit = 1) { - global $tla, $types; + global $tla, $types, $site, $siteBig; $text = array(); $headers = array(); @@ -695,17 +696,17 @@ /* user text with attention, headers and previous messages */ $user_text = "ATTENTION! Do NOT reply to this email!\n" . "To reply, use the web interface found at\n" . - "http://pear.php.net/bugs/bug.php?id=$bug[id]&edit=2\n\n\n" . + "http://$site.php.net/bugs/bug.php?id=$bug[id]&edit=2\n\n\n" . $header_text . $wrapped_text; /* developer text with headers, previous messages, and edit link */ $dev_text = 'Edit report at ' . - "http://pear.php.net/bugs/bug.php?id=$bug[id]&edit=1\n\n" . + "http://$site.php.net/bugs/bug.php?id=$bug[id]&edit=1\n\n" . $header_text . $wrapped_text . "\n-- \nEdit this bug report at " . - "http://pear.php.net/bugs/bug.php?id=$bug[id]&edit=1\n"; + "http://$site.php.net/bugs/bug.php?id=$bug[id]&edit=1\n"; /* send mail if status was changed or there is a comment */ if ($in[status] != $bug[status] || $ncomment != "") { @@ -731,15 +732,15 @@ # the user gets sent mail with an envelope sender that ignores bounces if (DEVBOX == false) { @mail($bug[email], - '[PEAR-BUG] ' . rinse($subj) . txfield('sdesc'), + "[$siteBig-BUG] " . rinse($subj) . txfield('sdesc'), $user_text, - "From: PEAR Bug Database <$mailfrom>\n". + "From: $siteBig Bug Database <$mailfrom>\n". "X-PHP-Bug: $bug[id]\n". - "In-Reply-To: <bug-$bug[id]@pear.php.net>", + "In-Reply-To: <bug-$bug[id]@$site.php.net>", "-fbounces-ignored@php.net"); # but we go ahead and let the default sender get used for the list @mail($mailto, - "[PEAR-BUG] " . rinse($subj) . txfield('sdesc'), + "[$siteBig-BUG] " . rinse($subj) . txfield('sdesc'), $dev_text, "From: $from\n". "X-PHP-Bug: $bug[id]\n". @@ -749,7 +750,7 @@ "X-PHP-OS: " . rinse((($edit != 3) ? $in['php_os'] : $bug['php_os'])) . "\n" . "X-PHP-Status: " . rinse($new_status) . "\n" . "X-PHP-Old-Status: " . rinse($old_status) . "\n" . - "In-Reply-To: <bug-$bug[id]@pear.php.net>", + "In-Reply-To: <bug-$bug[id]@$site.php.net>", "-fpear-sys@php.net"); } } @@ -771,7 +772,7 @@ $dev_text, "From: $from\n". "X-PHP-Bug: $bug[id]\n". - "In-Reply-To: <bug-$bug[id]@pear.php.net>", + "In-Reply-To: <bug-$bug[id]@$site.php.net>", "-fpear-sys@php.net"); } } @@ -800,7 +801,7 @@ */ function get_old_comments($bug_id, $all = 0) { - global $dbh; + global $dbh, $site; $divider = str_repeat("-", 72); $max_message_length = 10 * 1024; $max_comments = 5; @@ -831,7 +832,7 @@ } return ("\n\nPrevious Comments:\n$divider\n\n" . $output . "[$row[0]] ". spam_protect($row[1], 'text') ."\n\n$row[2]\n\n$divider\n\n"); } else { - return ("\n\nPrevious Comments:\n$divider\n\n" . $output . "The remainder of the comments for this report are too long. To view\nthe rest of the comments, please view the bug report online at\n http://pear.php.net/bugs/bug.php?id=$bug_id\n"); + return ("\n\nPrevious Comments:\n$divider\n\n" . $output . "The remainder of the comments for this report are too long. To view\nthe rest of the comments, please view the bug report online at\n http://$site.php.net/bugs/bug.php?id=$bug_id\n"); } return ''; @@ -934,6 +935,7 @@ */ function get_package_mail($package_name) { + global $site; // XXX Change to pear-bugs when it gets opened //$to[] = "pear-dev@lists.php.net"; @@ -953,7 +955,7 @@ $to[] = $data['email']; } - return array(implode(', ', $to), 'pear-dev@lists.php.net'); + return array(implode(', ', $to), $site.'-dev@lists.php.net'); } /** http://cvs.php.net/diff.php/pearweb/public_html/bugs/bug.php?r1=1.65&r2=1.66&ty=u Index: pearweb/public_html/bugs/bug.php diff -u pearweb/public_html/bugs/bug.php:1.65 pearweb/public_html/bugs/bug.php:1.66 --- pearweb/public_html/bugs/bug.php:1.65 Tue Oct 12 20:00:49 2004 +++ pearweb/public_html/bugs/bug.php Tue Oct 26 07:28:38 2004 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: bug.php,v 1.65 2004/10/13 00:00:49 dufuz Exp $ + * @version $Id: bug.php,v 1.66 2004/10/26 11:28:38 dufuz Exp $ */ /* @@ -327,7 +327,7 @@ . ' notified. You may return here and check on the' . ' status or update your report at any time. That URL' . ' for your bug report is: <a href="/bugs/bug.php?id=' - . $id . '">http://pear.php.net/bugs/bug.php?id=' + . $id . '">http://'.$site.'.php.net/bugs/bug.php?id=' . $id . '</a>.'); } elseif ($_GET['thanks'] == 6) { http://cvs.php.net/diff.php/pearweb/public_html/bugs/bug-pwd-finder.php?r1=1.10&r2=1.11&ty=u Index: pearweb/public_html/bugs/bug-pwd-finder.php diff -u pearweb/public_html/bugs/bug-pwd-finder.php:1.10 pearweb/public_html/bugs/bug-pwd-finder.php:1.11 --- pearweb/public_html/bugs/bug-pwd-finder.php:1.10 Tue Jun 22 14:27:40 2004 +++ pearweb/public_html/bugs/bug-pwd-finder.php Tue Oct 26 07:28:38 2004 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: bug-pwd-finder.php,v 1.10 2004/06/22 18:27:40 danielc Exp $ + * @version $Id: bug-pwd-finder.php,v 1.11 2004/10/26 11:28:38 dufuz Exp $ */ /** @@ -47,8 +47,8 @@ $passwd = $row['passwd']; $resp = mail($row['email'], - 'Password for PEAR bug report #' . $bug_id, - 'The password for PEAR bug report #' . $bug_id + 'Password for '.$siteBig.' bug report #' . $bug_id, + 'The password for '.$siteBig.' bug report #' . $bug_id . ' is ' . $passwd . '.', 'From: noreply@php.net'); http://cvs.php.net/diff.php/pearweb/public_html/bugs/report.php?r1=1.45&r2=1.46&ty=u Index: pearweb/public_html/bugs/report.php diff -u pearweb/public_html/bugs/report.php:1.45 pearweb/public_html/bugs/report.php:1.46 --- pearweb/public_html/bugs/report.php:1.45 Thu Sep 9 10:58:27 2004 +++ pearweb/public_html/bugs/report.php Tue Oct 26 07:28:38 2004 @@ -17,7 +17,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: report.php,v 1.45 2004/09/09 14:58:27 danielc Exp $ + * @version $Id: report.php,v 1.46 2004/10/26 11:28:38 dufuz Exp $ */ /** @@ -209,7 +209,7 @@ $ascii_report = "$report$sdesc\n\n" . wordwrap($fdesc); $ascii_report .= "\n-- \nEdit bug report at "; - $ascii_report .= "http://pear.php.net/bugs/bug.php?id=$cid&edit="; + $ascii_report .= "http://$site.php.net/bugs/bug.php?id=$cid&edit="; list($mailto, $mailfrom) = get_package_mail( $_POST['in']['package_name']); @@ -240,21 +240,21 @@ $extra_headers .= 'X-PHP-Category: ' . rinse($_POST['in']['package_name']) . "\n"; $extra_headers .= 'X-PHP-OS: ' . rinse($_POST['in']['php_os']) . "\n"; $extra_headers .= 'X-PHP-Status: Open' . "\n"; - $extra_headers .= 'Message-ID: <bug-' . $cid . '@pear.php.net>'; + $extra_headers .= 'Message-ID: <bug-' . $cid . '@'.$site.'.php.net>'; $type = @$types[$_POST['in']['bug_type']]; if (DEVBOX == false) { // mail to package developers - @mail($mailto, "[PEAR-BUG] $type #$cid [NEW]: $sdesc", + @mail($mailto, "[$siteBig-BUG] $type #$cid [NEW]: $sdesc", $ascii_report . "1\n-- \n$dev_extra", $extra_headers, '-fpear-sys@php.net'); // mail to reporter - @mail($email, "[PEAR-BUG] $type #$cid: $sdesc", + @mail($email, "[$siteBig-BUG] $type #$cid: $sdesc", $ascii_report . "2\n", - "From: PEAR Bug Database <$mailfrom>\n" . + "From: $siteBig Bug Database <$mailfrom>\n" . "X-PHP-Bug: $cid\n" . - "Message-ID: <bug-$cid@pear.php.net>", + "Message-ID: <bug-$cid@$site.php.net>", '-fpear-sys@php.net'); } localRedirect('bug.php?id=' . $cid . '&thanks=4'); @@ -352,8 +352,8 @@ echo '<p><strong>WARNING: You are saying the <em>package'; echo ' affected</em> is the &quot;Bug System.&quot; This'; echo ' category is <em>only</em> for telling us about problems'; - echo ' that the PEAR website\'s bug user interface is having. If'; - echo ' your bug is about a PEAR package or other aspect of the'; + echo ' that the '.$siteBig.' website\'s bug user interface is having. If'; + echo ' your bug is about a '.$siteBig.' package or other aspect of the'; echo ' website, please hit the back button and actually read that'; echo ' page so you can properly categorize your bug.</strong></p>'; } @@ -416,7 +416,7 @@ <td class="form-input"> Please supply any information that may be helpful in fixing the bug: <ul> - <li>The version number of the PEAR package or files you are using.</li> + <li>The version number of the <?php echo $siteBig; ?> package or files you are using.</li> <li>A short script that reproduces the problem.</li> <li>The list of modules you compiled PHP with (your configure line).</li> <li>Any other information unique or specific to your setup.</li>
« previous php.pear.core (#1147) next »