cvs: pearweb /include pear-database.php
| From: | Martin Jansen | Date: | Tue, 16 Aug 2005 10:31:32 +0000 |
| Subject: | cvs: pearweb /include pear-database.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-3588@lists.php.net to get a copy of this message | ||
mj Tue Aug 16 06:31:32 2005 EDT
Modified files:
/pearweb/include pear-database.php
Log:
* Make sure that the query does not fail when there are additional fields
in the table.
http://cvs.php.net/diff.php/pearweb/include/pear-database.php?r1=1.282&r2=1.283&ty=u
Index: pearweb/include/pear-database.php
diff -u pearweb/include/pear-database.php:1.282 pearweb/include/pear-database.php:1.283
--- pearweb/include/pear-database.php:1.282 Sat Aug 13 01:03:26 2005
+++ pearweb/include/pear-database.php Tue Aug 16 06:31:30 2005
@@ -17,7 +17,7 @@
| Tomas V.V.Cox <cox@php.net> |
| Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: pear-database.php,v 1.282 2005/08/13 05:03:26 cellog Exp $
+ $Id: pear-database.php,v 1.283 2005/08/16 10:31:30 mj Exp $
*/
require_once 'DB/storage.php';
@@ -1194,7 +1194,7 @@
*/
function add($package, $user, $role, $active = 1)
{
- global $dbh, $auth_user, $pear_rest;
+ global $dbh, $pear_rest;
if (!user::exists($user)) {
return PEAR::raiseError("User $user does not exist");
@@ -1202,7 +1202,7 @@
if (is_string($package)) {
$package = package::info($package, 'id');
}
- $err = $dbh->query("INSERT INTO maintains VALUES(?,?,?,?)",
+ $err = $dbh->query("INSERT INTO maintains (handle, package, role, active) VALUES(?,
?, ?, ?)",
array($user, $package, $role, $active));
if (DB::isError($err)) {
return $err;