cvs: pear /Perm_LiveUser/Admin/Perm/Container DB_Medium.php MDB2_Medium.php MDB_Medium.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sun, 24 Oct 2004 11:36:18 +0000 |
| Subject: | cvs: pear /Perm_LiveUser/Admin/Perm/Container DB_Medium.php MDB2_Medium.php MDB_Medium.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-25171@lists.php.net to get a copy of this message | ||
dufuz Sun Oct 24 07:36:18 2004 EDT
Modified files:
/pear/Perm_LiveUser/Admin/Perm/Container DB_Medium.php
MDB2_Medium.php
MDB_Medium.php
Log:
getGroups, now optional fields are gotten through foreach, less code.
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php?r1=1.78&r2=1.79&ty=u
Index: pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php
diff -u pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.78
pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.79
--- pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php:1.78 Sun Oct 24 07:23:59 2004
+++ pear/Perm_LiveUser/Admin/Perm/Container/DB_Medium.php Sun Oct 24 07:36:16 2004
@@ -51,7 +51,7 @@
* @author Markus Wolff <wolff@21st.de>
* @author Matt Scifo <mscifo@php.net>
* @author Arnaud Limbourg <arnaud@php.net>
- * @version $Id: DB_Medium.php,v 1.78 2004/10/24 11:23:59 dufuz Exp $
+ * @version $Id: DB_Medium.php,v 1.79 2004/10/24 11:36:16 dufuz Exp $
* @package LiveUser
*/
class LiveUser_Admin_Perm_Container_DB_Medium extends LiveUser_Admin_Perm_Container_DB_Simple
@@ -515,20 +515,10 @@
$this->groupTableCols['required']['group_define_name']['type'],
);
- if (isset($this->groupTableCols['optional']['group_type'])) {
- $customFields[] =
$this->groupTableCols['optional']['group_type']['name'] . ' AS
group_type';
- }
-
- if (isset($this->groupTableCols['optional']['is_active'])) {
- $customFields[] =
$this->groupTableCols['optional']['is_active']['name'] . ' AS
is_active';
- }
-
- if (isset($this->groupTableCols['optional']['owner_user_id'])) {
- $customFields[] =
$this->groupTableCols['optional']['owner_user_id']['name'] . '
AS owner_user_id';
- }
-
- if (isset($this->groupTableCols['optional']['owner_group_id'])) {
- $customFields[] =
$this->groupTableCols['optional']['owner_group_id']['name'] .
' AS owner_group_id';
+ if (isset($this->groupTableCols['optional']) &&
count($this->groupTableCols['optional']) > 0) {
+ foreach ($this->groupTableCols['optional'] as $alias => $field_data) {
+ $customFields[] = $field_data['name'] . ' AS ' . $alias;
+ }
}
if (isset($this->groupTableCols['custom']) &&
count($this->groupTableCols['custom']) > 0) {
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php?r1=1.39&r2=1.40&ty=u
Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php
diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.39
pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.40
--- pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php:1.39 Sun Oct 24 07:23:59 2004
+++ pear/Perm_LiveUser/Admin/Perm/Container/MDB2_Medium.php Sun Oct 24 07:36:17 2004
@@ -51,7 +51,7 @@
* @author Markus Wolff <wolff@21st.de>
* @author Matt Scifo <mscifo@php.net>
* @author Arnaud Limbourg <arnaud@php.net>
- * @version $Id: MDB2_Medium.php,v 1.39 2004/10/24 11:23:59 dufuz Exp $
+ * @version $Id: MDB2_Medium.php,v 1.40 2004/10/24 11:36:17 dufuz Exp $
* @package LiveUser
*/
class LiveUser_Admin_Perm_Container_MDB2_Medium extends LiveUser_Admin_Perm_Container_MDB2_Simple
@@ -517,24 +517,11 @@
'text',
);
- if (isset($this->groupTableCols['optional']['group_type'])) {
- $customFields[] =
$this->groupTableCols['optional']['group_type']['name'] . ' AS
group_type';
- $types[] =
$this->groupTableCols['optional']['group_type']['type'];
- }
-
- if (isset($this->groupTableCols['optional']['is_active'])) {
- $customFields[] =
$this->groupTableCols['optional']['is_active']['name'] . ' AS
is_active';
- $types[] =
$this->groupTableCols['optional']['is_active']['type'];
- }
-
- if (isset($this->groupTableCols['optional']['owner_user_id'])) {
- $customFields[] =
$this->groupTableCols['optional']['owner_user_id']['name'] . '
AS owner_user_id';
- $types[] =
$this->groupTableCols['optional']['owner_user_id']['type'];
- }
-
- if (isset($this->groupTableCols['optional']['owner_group_id'])) {
- $customFields[] =
$this->groupTableCols['optional']['owner_group_id']['name'] .
' AS owner_group_id';
- $types[] =
$this->groupTableCols['optional']['owner_group_id']['type'];
+ if (isset($this->groupTableCols['optional']) &&
count($this->groupTableCols['optional']) > 0) {
+ foreach ($this->groupTableCols['optional'] as $alias => $field_data) {
+ $customFields[] = $field_data['name'] . ' AS ' . $alias;
+ $types[] = $field_data['type'];
+ }
}
if (isset($this->groupTableCols['custom']) &&
count($this->groupTableCols['custom']) > 0) {
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php?r1=1.64&r2=1.65&ty=u
Index: pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php
diff -u pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.64
pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.65
--- pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php:1.64 Sun Oct 24 07:23:59 2004
+++ pear/Perm_LiveUser/Admin/Perm/Container/MDB_Medium.php Sun Oct 24 07:36:17 2004
@@ -51,7 +51,7 @@
* @author Markus Wolff <wolff@21st.de>
* @author Matt Scifo <mscifo@php.net>
* @author Arnaud Limbourg <arnaud@php.net>
- * @version $Id: MDB_Medium.php,v 1.64 2004/10/24 11:23:59 dufuz Exp $
+ * @version $Id: MDB_Medium.php,v 1.65 2004/10/24 11:36:17 dufuz Exp $
* @package LiveUser
*/
class LiveUser_Admin_Perm_Container_MDB_Medium extends LiveUser_Admin_Perm_Container_MDB_Simple
@@ -517,24 +517,11 @@
'text',
);
- if (isset($this->groupTableCols['optional']['group_type'])) {
- $customFields[] =
$this->groupTableCols['optional']['group_type']['name'] . ' AS
group_type';
- $types[] =
$this->groupTableCols['optional']['group_type']['type'];
- }
-
- if (isset($this->groupTableCols['optional']['is_active'])) {
- $customFields[] =
$this->groupTableCols['optional']['is_active']['name'] . ' AS
is_active';
- $types[] =
$this->groupTableCols['optional']['is_active']['type'];
- }
-
- if (isset($this->groupTableCols['optional']['owner_user_id'])) {
- $customFields[] =
$this->groupTableCols['optional']['owner_user_id']['name'] . '
AS owner_user_id';
- $types[] =
$this->groupTableCols['optional']['owner_user_id']['type'];
- }
-
- if (isset($this->groupTableCols['optional']['owner_group_id'])) {
- $customFields[] =
$this->groupTableCols['optional']['owner_group_id']['name'] .
' AS owner_group_id';
- $types[] =
$this->groupTableCols['optional']['owner_group_id']['type'];
+ if (isset($this->groupTableCols['optional']) &&
count($this->groupTableCols['optional']) > 0) {
+ foreach ($this->groupTableCols['optional'] as $alias => $field_data) {
+ $customFields[] = $field_data['name'] . ' AS ' . $alias;
+ $types[] = $field_data['type'];
+ }
}
if (isset($this->groupTableCols['custom']) &&
count($this->groupTableCols['custom']) > 0) {