|
cvs: pearweb /include pear-database.php /include/Damblan Trackback.php /p: msg#00060php.pear.core
cellog Thu Oct 19 02:21:19 2006 UTC Modified files: /pearweb/include pear-database.php /pearweb/public_html/trackback trackback.php /pearweb/include/Damblan Trackback.php Log: implement Request #8176 do not mail in active developers (David Coallier) http://cvs.php.net/viewvc.cgi/pearweb/include/pear-database.php?r1=1.319&r2=1.320&diff_format=u Index: pearweb/include/pear-database.php diff -u pearweb/include/pear-database.php:1.319 pearweb/include/pear-database.php:1.320 --- pearweb/include/pear-database.php:1.319 Wed Oct 18 19:07:12 2006 +++ pearweb/include/pear-database.php Thu Oct 19 02:21:19 2006 @@ -18,7 +18,7 @@ | Martin Jansen <mj@xxxxxxx> | | Gregory Beaver <cellog@xxxxxxx> | +----------------------------------------------------------------------+ - $Id: pear-database.php,v 1.319 2006/10/18 19:07:12 cellog Exp $ + $Id: pear-database.php,v 1.320 2006/10/19 02:21:19 cellog Exp $ */ require_once 'DB/storage.php'; @@ -1296,18 +1296,26 @@ * @static * @param mixed Name of the package or it's ID * @param boolean Only return lead maintainers? + * @param boolean Only get all maintainers but possibility + * of getting all maintainer if active is set to false. * @return array */ - function get($package, $lead = false) + function get($package, $lead = false, $active = false) { global $dbh; if (is_string($package)) { $package = package::info($package, 'id'); } $query = "SELECT handle, role, active FROM maintains WHERE package = ?"; + if ($lead) { $query .= " AND role = 'lead'"; } + + if ($active) { + $query . ' AND active = 1'; + } + $query .= " ORDER BY active DESC"; return $dbh->getAssoc($query, true, array($package), DB_FETCHMODE_ASSOC); @@ -1466,7 +1474,7 @@ } // }}} - // {{{ + // {{{ update /** * Update maintainer entry @@ -1484,7 +1492,7 @@ "WHERE package = ? AND handle = ?"; return $dbh->query($query, array($role, $active, $package, $user)); } - + // }}} // {{{ NOEXPORT maintainer::mayUpdate(int) /** http://cvs.php.net/viewvc.cgi/pearweb/public_html/trackback/trackback.php?r1=1.22&r2=1.23&diff_format=u Index: pearweb/public_html/trackback/trackback.php diff -u pearweb/public_html/trackback/trackback.php:1.22 pearweb/public_html/trackback/trackback.php:1.23 --- pearweb/public_html/trackback/trackback.php:1.22 Wed Sep 13 13:23:50 2006 +++ pearweb/public_html/trackback/trackback.php Thu Oct 19 02:21:19 2006 @@ -17,7 +17,7 @@ | Authors: Tobias Schlitt <toby@xxxxxxx> | | | +----------------------------------------------------------------------+ - $Id: trackback.php,v 1.22 2006/09/13 13:23:50 toby Exp $ + $Id: trackback.php,v 1.23 2006/10/19 02:21:19 cellog Exp $ */ @@ -102,7 +102,9 @@ ); $mailer = Damblan_Mailer::create('Trackback_New', $mailData); -$additionalHeaders['To'] = $trackback->getMaintainers(); + +// Get active maintainers only +$additionalHeaders['To'] = $trackback->getMaintainers(true); if (!DEVBOX) { $res = $mailer->send($additionalHeaders); } else { http://cvs.php.net/viewvc.cgi/pearweb/include/Damblan/Trackback.php?r1=1.16&r2=1.17&diff_format=u Index: pearweb/include/Damblan/Trackback.php diff -u pearweb/include/Damblan/Trackback.php:1.16 pearweb/include/Damblan/Trackback.php:1.17 --- pearweb/include/Damblan/Trackback.php:1.16 Tue Apr 18 21:14:35 2006 +++ pearweb/include/Damblan/Trackback.php Thu Oct 19 02:21:19 2006 @@ -396,12 +396,15 @@ * * @since * @access public - * @param + * @param boolean $activeOnly To get only active leads + * is set to false by default so there's + * no bc problems. + * * @return array(string) The list of maintainer emails. */ - function getMaintainers () + function getMaintainers ($activeOnly = false) { - $maintainers = maintainer::get($this->get('id'), true); + $maintainers = maintainer::get($this->get('id'), true, $activeOnly); $res = array(); foreach ($maintainers as $maintainer => $data) { -- PEAR CVS Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs: pearweb /public_html package-info.php: 00060, Greg Beaver |
|---|---|
| Next by Date: | cvs: pearweb /public_html index.php: 00060, Greg Beaver |
| Previous by Thread: | cvs: pearweb /public_html package-info.phpi: 00060, Greg Beaver |
| Next by Thread: | cvs: pearweb /public_html index.php: 00060, Greg Beaver |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |