cvs: pear /Perm_LiveUser/Admin/Auth/Container DB.php MDB.php MDB2.php
| From: | Arnaud Limbourg | Date: | Wed, 16 Jun 2004 18:58:31 +0000 |
| Subject: | cvs: pear /Perm_LiveUser/Admin/Auth/Container DB.php MDB.php MDB2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-20755@lists.php.net to get a copy of this message | ||
arnaud Wed Jun 16 14:58:31 2004 EDT
Modified files:
/pear/Perm_LiveUser/Admin/Auth/Container DB.php MDB.php MDB2.php
Log:
* fix #1639 : absence of custom fields made the admin container crash
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Auth/Container/DB.php?r1=1.53&r2=1.54&ty=u
Index: pear/Perm_LiveUser/Admin/Auth/Container/DB.php
diff -u pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.53
pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.54
--- pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.53 Sun Jun 13 11:13:24 2004
+++ pear/Perm_LiveUser/Admin/Auth/Container/DB.php Wed Jun 16 14:58:30 2004
@@ -47,7 +47,7 @@
* This class is only experimental. API may change. Use it at your own risk.
*
* @author Bjoern Kraus <krausbn@php.net>
- * @version $Id: DB.php,v 1.53 2004/06/13 15:13:24 lsmith Exp $
+ * @version $Id: DB.php,v 1.54 2004/06/16 18:58:30 arnaud Exp $
* @package LiveUser
* @category authentication
*/
@@ -188,9 +188,11 @@
$val[] = (int)$owner_group_id;
}
- foreach ($this->authTableCols['custom'] as $alias => $field_data) {
- $col[] = $field_data['name'];
- $val[] = $this->dbc->quoteSmart($customFields[$alias]);
+ if (sizeof($this->authTableCols['custom']) > 0) {
+ foreach ($this->authTableCols['custom'] as $alias => $field_data) {
+ $col[] = $field_data['name'];
+ $val[] = $this->dbc->quoteSmart($customFields[$alias]);
+ }
}
if (is_array($col) && count($col) > 0) {
@@ -308,9 +310,11 @@
$this->authTableCols['optional']['owner_group_id']['name'] . '
= ' . (int)$owner_group_id;
}
- foreach ($this->authTableCols['custom'] as $alias => $field_data) {
- $updateValues[] = $field_data['name'] .
- $this->dbc->quoteSmart($customFields[$alias]);
+ if (sizeof($this->authTableCols['custom']) > 0) {
+ foreach ($this->authTableCols['custom'] as $alias => $field_data) {
+ $updateValues[] = $field_data['name'] .
+ $this->dbc->quoteSmart($customFields[$alias]);
+ }
}
if (count($updateValues) > 0) {
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Auth/Container/MDB.php?r1=1.59&r2=1.60&ty=u
Index: pear/Perm_LiveUser/Admin/Auth/Container/MDB.php
diff -u pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.59
pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.60
--- pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.59 Sun Jun 13 11:13:24 2004
+++ pear/Perm_LiveUser/Admin/Auth/Container/MDB.php Wed Jun 16 14:58:30 2004
@@ -45,7 +45,7 @@
* This class is only experimental. API may change. Use it at your own risk.
*
* @author Lukas Smith <smith@backendmedia.com>
- * @version $Id: MDB.php,v 1.59 2004/06/13 15:13:24 lsmith Exp $
+ * @version $Id: MDB.php,v 1.60 2004/06/16 18:58:30 arnaud Exp $
* @package LiveUser
* @category authentication
*/
@@ -203,9 +203,11 @@
$val[] =
$this->dbc->getValue($this->authTableCols['optional']['owner_group_id']['type'],
$owner_group_id);
}
- foreach ($this->authTableCols['custom'] as $alias => $field_data) {
- $col[] = $field_data['name'];
- $val[] = $this->dbc->getValue($field_data['type'],
$customFields[$alias]);
+ if (sizeof($this->authTableCols['custom']) > 0) {
+ foreach ($this->authTableCols['custom'] as $alias => $field_data) {
+ $col[] = $field_data['name'];
+ $val[] = $this->dbc->getValue($field_data['type'],
$customFields[$alias]);
+ }
}
if (is_array($col) && count($col) > 0) {
@@ -326,9 +328,11 @@
.
$this->dbc->getValue($this->authTableCols['optional']['owner_group_id']['type'],
$owner_group_id);
}
- foreach ($this->authTableCols['custom'] as $alias => $field_data) {
- $updateValues[] = $field_data['name'] .
- $this->dbc->getValue($field_data['type'], $customFields[$alias]);
+ if (sizeof($this->authTableCols['custom']) > 0) {
+ foreach ($this->authTableCols['custom'] as $alias => $field_data) {
+ $updateValues[] = $field_data['name'] .
+ $this->dbc->getValue($field_data['type'],
$customFields[$alias]);
+ }
}
if (count($updateValues) >= 1) {
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php?r1=1.25&r2=1.26&ty=u
Index: pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php
diff -u pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php:1.25
pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php:1.26
--- pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php:1.25 Sun Jun 13 11:13:24 2004
+++ pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php Wed Jun 16 14:58:31 2004
@@ -45,7 +45,7 @@
* This class is only experimental. API may change. Use it at your own risk.
*
* @author Lukas Smith <smith@backendmedia.com>
- * @version $Id: MDB2.php,v 1.25 2004/06/13 15:13:24 lsmith Exp $
+ * @version $Id: MDB2.php,v 1.26 2004/06/16 18:58:31 arnaud Exp $
* @package LiveUser
* @category authentication
*/
@@ -203,9 +203,11 @@
$val[] = $this->dbc->quote($owner_group_id,
$this->authTableCols['optional']['owner_group_id']['type']);
}
- foreach ($this->authTableCols['custom'] as $alias => $field_data) {
- $col[] = $field_data['name'];
- $val[] = $this->dbc->quote($customFields[$alias], $field_data['type']);
+ if (sizeof($this->authTableCols['custom']) > 0) {
+ foreach ($this->authTableCols['custom'] as $alias => $field_data) {
+ $col[] = $field_data['name'];
+ $val[] = $this->dbc->quote($customFields[$alias],
$field_data['type']);
+ }
}
if (is_array($col) && count($col) > 0) {
@@ -326,9 +328,11 @@
. $this->dbc->quote($owner_group_id,
$this->authTableCols['optional']['owner_group_id']['type']);
}
- foreach ($this->authTableCols['custom'] as $alias => $field_data) {
- $updateValues[] = $field_data['name'] .
- $this->dbc->quote($customFields[$alias], $field_data['type']);
+ if (sizeof($this->authTableCols['custom']) > 0) {
+ foreach ($this->authTableCols['custom'] as $alias => $field_data) {
+ $updateValues[] = $field_data['name'] .
+ $this->dbc->quote($customFields[$alias], $field_data['type']);
+ }
}
if (count($updateValues) >= 1) {