Don't send bug mails to inactive developers
| From: | Martin Jansen | Date: | Thu, 23 Feb 2006 17:42:42 +0000 |
| Subject: | Don't send bug mails to inactive developers | ||
| Groups: | php.pear.webmaster | ||
| Request: | Send a blank email to pear-webmaster+get-4859@lists.php.net to get a copy of this message | ||
Attached you'll find a patch against pearweb HEAD that has the effect
that inactive maintainers don't get emails from the bug tracker. I
think this is a rather sane approach because inactive people usually are
not interested in bug reports. Feedback appreciated.
(I haven't tested the patch [only proved its correctness] because I
don't have a working bug tracker setup at the moment.)
- Martin
Index: include/pear-database.php =================================================================== RCS file: /repository/pearweb/include/pear-database.php,v retrieving revision 1.300 diff -u -r1.300 pear-database.php --- include/pear-database.php 29 Nov 2005 08:18:12 -0000 1.300 +++ include/pear-database.php 23 Feb 2006 17:39:35 -0000 @@ -767,7 +767,7 @@ $sql = "SELECT description FROM packages p WHERE " . $package_type . " p.{$what} = ?"; $info = $dbh->query($sql, array($pkg)); } elseif ($field == 'authors') { - $sql = "SELECT u.handle, u.name, u.email, u.showemail, m.role + $sql = "SELECT u.handle, u.name, u.email, u.showemail, u.active, m.role FROM maintains m, users u, packages p WHERE " . $package_type ." m.package = p.id AND p.$what = ? Index: public_html/bugs/include/functions.inc =================================================================== RCS file: /repository/pearweb/public_html/bugs/include/functions.inc,v retrieving revision 1.100 diff -u -r1.100 functions.inc --- public_html/bugs/include/functions.inc 22 Feb 2006 12:47:10 -0000 1.100 +++ public_html/bugs/include/functions.inc 23 Feb 2006 17:39:36 -0000 @@ -1026,6 +1026,9 @@ $to = array(); foreach ($maintainers as $data) { + if (!$data['active']) { + continue; + } $to[] = $data['email']; }
Index: include/pear-database.php =================================================================== RCS file: /repository/pearweb/include/pear-database.php,v retrieving revision 1.300 diff -u -r1.300 pear-database.php --- include/pear-database.php 29 Nov 2005 08:18:12 -0000 1.300 +++ include/pear-database.php 23 Feb 2006 17:39:35 -0000 @@ -767,7 +767,7 @@ $sql = "SELECT description FROM packages p WHERE " . $package_type . " p.{$what} = ?"; $info = $dbh->query($sql, array($pkg)); } elseif ($field == 'authors') { - $sql = "SELECT u.handle, u.name, u.email, u.showemail, m.role + $sql = "SELECT u.handle, u.name, u.email, u.showemail, u.active, m.role FROM maintains m, users u, packages p WHERE " . $package_type ." m.package = p.id AND p.$what = ? Index: public_html/bugs/include/functions.inc =================================================================== RCS file: /repository/pearweb/public_html/bugs/include/functions.inc,v retrieving revision 1.100 diff -u -r1.100 functions.inc --- public_html/bugs/include/functions.inc 22 Feb 2006 12:47:10 -0000 1.100 +++ public_html/bugs/include/functions.inc 23 Feb 2006 17:39:36 -0000 @@ -1026,6 +1026,9 @@ $to = array(); foreach ($maintainers as $data) { + if (!$data['active']) { + continue; + } $to[] = $data['email']; }