Re: cvs: pearweb /include pear-database.php /public_html/bugs/include functions.inc

From: Date: Fri, 24 Feb 2006 07:07:47 +0000
Subject: Re: cvs: pearweb /include pear-database.php /public_html/bugs/include functions.inc
References: 1  Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-38551@lists.php.net to get a copy of this message
Some upgrade missing ? I get ERROR: * DB Error: no such field As I wanted to report a new bug. Regards -- toggg Pierre-Alain Joye wrote:
pajoye Fri Feb 24 00:34:08 2006 UTC
 Modified files:                 /pearweb/include	pear-database.php    /pearweb/public_html/bugs/include	functions.inc  Log:
- do not send mail to inactive maintainers (Martin) - some cast to int (Alan) http://cvs.php.net/viewcvs.cgi/pearweb/include/pear-database.php?r1=1.301&r2=1.302&diff_format=u Index: pearweb/include/pear-database.php diff -u pearweb/include/pear-database.php:1.301 pearweb/include/pear-database.php:1.302 --- pearweb/include/pear-database.php:1.301 Thu Feb 23 22:33:31 2006 +++ pearweb/include/pear-database.php Fri Feb 24 00:34:08 2006 @@ -17,7 +17,7 @@
   |          Tomas V.V.Cox <cox@php.net>                                 |
   |          Martin Jansen <mj@php.net>                                  |
+----------------------------------------------------------------------+ - $Id: pear-database.php,v 1.301 2006/02/23 22:33:31 pajoye Exp $ + $Id: pear-database.php,v 1.302 2006/02/24 00:34:08 pajoye Exp $ */ require_once 'DB/storage.php'; @@ -768,7 +768,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 = ?
http://cvs.php.net/viewcvs.cgi/pearweb/public_html/bugs/include/functions.inc?r1=1.100&r2=1.101&diff_format=u Index: pearweb/public_html/bugs/include/functions.inc diff -u pearweb/public_html/bugs/include/functions.inc:1.100 pearweb/public_html/bugs/include/functions.inc:1.101 --- pearweb/public_html/bugs/include/functions.inc:1.100 Wed Feb 22 12:47:10 2006 +++ pearweb/public_html/bugs/include/functions.inc Fri Feb 24 00:34:08 2006 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: functions.inc,v 1.100 2006/02/22 12:47:10 pajoye Exp $ + * @version $Id: functions.inc,v 1.101 2006/02/24 00:34:08 pajoye Exp $ */ @@ -1026,11 +1026,16 @@
    $to = array();
    foreach ($maintainers as $data) {
+        if (!$data['active']) {
+            continue;
+        }
        $to[] = $data['email'];
    }
    /* subscription */
    if ($bug_id) {
+        $bug_id = (int)$bug_id;
+
        $bcc = $dbh->getCol('SELECT email FROM bugdb_subscribe WHERE bug_id=' . $bug_id);
        $bcc = array_diff($bcc, $to);
        $bcc = array_unique($bcc);
@@ -1168,6 +1173,7 @@
    $now = time();
    $hash = crypt($email . $id, $now);
+    $bug_id = (int)$bug_id;
    $query = 'UPDATE bugdb_subscribe
                SET unsubscribe_date=' . $now . ',
@@ -1211,6 +1217,8 @@
    global $dbh;
    $hash = escapeSQL($hash);
+    $bug_id = (int) $bug_id;
+
    $query = 'SELECT
                bug_id, email, unsubscribe_date, unsubscribe_hash
            FROM


« previous php.pear.cvs (#38551) next »