From 5693038f9f4fa55010179576c8ed23b6308d904f Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 10 Apr 2008 09:06:00 +0000 Subject: [PATCH] added fields created/modified to the retrieval of the single account info. added accountstatus/created/modified to the retrieval of the account list --- phpgwapi/inc/class.accounts_sql.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index e6e57f07a0..2a14e7aa4b 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -112,7 +112,9 @@ class accounts_sql $this->contacts_table.'.n_family AS account_lastname,'. $this->contacts_table.'.contact_email AS account_email,'. $this->contacts_table.'.n_fn AS account_fullname,'. - $this->contacts_table.'.contact_id AS person_id,'; + $this->contacts_table.'.contact_id AS person_id,'. + $this->contacts_table.'.contact_created AS account_created,'. + $this->contacts_table.'.contact_modified AS account_modified,'; $join = 'LEFT JOIN '.$this->contacts_table.' ON '.$this->table.'.account_id='.$this->contacts_table.'.account_id'; } if (!($data = $this->db->select($this->table,$extra_cols.$this->table.'.*',$this->table.'.account_id='.abs($account_id), @@ -377,8 +379,8 @@ class accounts_sql } } $accounts = array(); -if (!is_object($GLOBALS['egw']->contacts)) throw new exception('No $GLOBALS[egw]->contacts!'); - if (($contacts =& $GLOBALS['egw']->contacts->search($criteria,false,$order,"account_lid,account_type,$this->table.account_id", + if (!is_object($GLOBALS['egw']->contacts)) throw new exception('No $GLOBALS[egw]->contacts!'); + if (($contacts =& $GLOBALS['egw']->contacts->search($criteria,false,$order,"account_lid,account_type,account_status,$this->table.account_id", $wildcard,false,'OR',$offset ? array($start,$offset) : is_null($start) ? false : $start, $filter,$this->contacts_join))) { @@ -392,6 +394,9 @@ if (!is_object($GLOBALS['egw']->contacts)) throw new exception('No $GLOBALS[egw] 'account_lastname' => $contact['n_family'], 'account_email' => $contact['email'], 'person_id' => $contact['id'], + 'account_status' => $contact['account_status'], + 'account_created' => $contact['created'], + 'account_modified' => $contact['modified'], ); } }