From 2654dccb4557298cca2375b3dd87ff7a16ff15fb Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 17 Feb 2015 10:51:16 +0000 Subject: [PATCH] * PostgreSQL: fixed not working new installation due to access to egw_mailaccounts table prior to creating it: gets now checked, to not abort transaction --- phpgwapi/inc/class.accounts_sql.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index 75e8ab97ca..5e98a802fb 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -128,7 +128,9 @@ class accounts_sql $this->contacts_table.'.tel_work AS account_phone,'; $join = 'LEFT JOIN '.$this->contacts_table.' ON '.$this->table.'.account_id='.$this->contacts_table.'.account_id'; } - else + // during setup emailadmin might not yet be installed and running below query + // will abort transaction in PostgreSQL + elseif (!isset($GLOBALS['egw_setup']) || in_array(emailadmin_smtp_sql::TABLE, $this->db->table_names(true))) { $extra_cols = emailadmin_smtp_sql::TABLE.'.mail_value AS account_email,'; $join = 'LEFT JOIN '.emailadmin_smtp_sql::TABLE.' ON '.$this->table.'.account_id=-'.emailadmin_smtp_sql::TABLE.'.account_id AND mail_type='.emailadmin_smtp_sql::TYPE_ALIAS;