cvs: pear /Perm_LiveUser/Admin/Auth/Container DB.php MDB.php MDB2.php

From: Date: Mon, 05 Jul 2004 17:42:20 +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-21529@lists.php.net to get a copy of this message
arnaud Mon Jul 5 13:42:20 2004 EDT Modified files: /pear/Perm_LiveUser/Admin/Auth/Container DB.php MDB.php MDB2.php Log: * custom fields handling was not implemented correctly. We were looping through custom fields defined in the configuration array. Now we loop through the custom fields passed to the method. http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Auth/Container/DB.php?r1=1.57&r2=1.58&ty=u Index: pear/Perm_LiveUser/Admin/Auth/Container/DB.php diff -u pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.57 pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.58 --- pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.57 Mon Jul 5 05:42:04 2004 +++ pear/Perm_LiveUser/Admin/Auth/Container/DB.php Mon Jul 5 13:42:20 2004 @@ -45,7 +45,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.57 2004/07/05 09:42:04 dufuz Exp $ + * @version $Id: DB.php,v 1.58 2004/07/05 17:42:20 arnaud Exp $ * @package LiveUser * @category authentication */ @@ -186,10 +186,10 @@ $val[] = (int)$owner_group_id; } - 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 (sizeof($customFields) > 0) { + foreach ($customFields as $alias => $value) { + $col[] = $this->authTableCols['custom'][$alias]['name']; + $val[] = $this->dbc->quoteSmart($value); } } @@ -308,10 +308,10 @@ $this->authTableCols['optional']['owner_group_id']['name'] . ' = ' . (int)$owner_group_id; } - if (sizeof($this->authTableCols['custom']) > 0) { - foreach ($this->authTableCols['custom'] as $alias => $field_data) { - $updateValues[] = $field_data['name'] . '=' . - $this->dbc->quoteSmart($customFields[$alias]); + if (sizeof($customFields) > 0) { + foreach ($customFields as $alias => $value) { + $updateValues[] = $this->authTableCols['custom'][$alias]['name'] . '=' . + $this->dbc->quoteSmart($value); } } http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Auth/Container/MDB.php?r1=1.63&r2=1.64&ty=u Index: pear/Perm_LiveUser/Admin/Auth/Container/MDB.php diff -u pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.63 pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.64 --- pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.63 Mon Jul 5 05:42:04 2004 +++ pear/Perm_LiveUser/Admin/Auth/Container/MDB.php Mon Jul 5 13:42:20 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.63 2004/07/05 09:42:04 dufuz Exp $ + * @version $Id: MDB.php,v 1.64 2004/07/05 17:42:20 arnaud Exp $ * @package LiveUser * @category authentication */ @@ -203,10 +203,10 @@ $val[] = $this->dbc->getValue($this->authTableCols['optional']['owner_group_id']['type'], $owner_group_id); } - 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 (sizeof($customFields) > 0) { + foreach ($customFields as $alias => $value) { + $col[] = $this->authTableCols['custom'][$alias]['name']; + $val[] = $this->dbc->getValue($this->authTableCols['custom'][$alias]['type'], $value); } } @@ -328,10 +328,10 @@ . $this->dbc->getValue($this->authTableCols['optional']['owner_group_id']['type'], $owner_group_id); } - 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 (sizeof($customFields) > 0) { + foreach ($customFields as $alias => $value) { + $updateValues[] = $this->authTableCols['custom'][$alias]['name'] . '=' . + $this->dbc->getValue($this->authTableCols['custom'][$alias]['type'], $value); } } http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php?r1=1.29&r2=1.30&ty=u Index: pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php diff -u pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php:1.29 pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php:1.30 --- pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php:1.29 Mon Jul 5 05:42:04 2004 +++ pear/Perm_LiveUser/Admin/Auth/Container/MDB2.php Mon Jul 5 13:42:20 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.29 2004/07/05 09:42:04 dufuz Exp $ + * @version $Id: MDB2.php,v 1.30 2004/07/05 17:42:20 arnaud Exp $ * @package LiveUser * @category authentication */ @@ -203,10 +203,10 @@ $val[] = $this->dbc->quote($owner_group_id, $this->authTableCols['optional']['owner_group_id']['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 (sizeof($customFields) > 0) { + foreach ($customFields as $alias => $value) { + $col[] = $this->authTableCols['custom'][$alias]['name']; + $val[] = $this->dbc->quote($value, $this->authTableCols['custom'][$alias]['type']); } } @@ -328,10 +328,10 @@ . $this->dbc->quote($owner_group_id, $this->authTableCols['optional']['owner_group_id']['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 (sizeof($customFields) > 0) { + foreach ($customFields as $alias => $value) { + $updateValues[] = $this->authTableCols['custom'][$alias]['name'] . '=' . + $this->dbc->quote($value, $this->authTableCols['custom'][$alias]['type']); } }

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