From 5e2ff3b54f3f2b59bc0318a945ff9210309f3cfd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 27 Feb 2009 08:47:10 +0000 Subject: [PATCH] "fixed SQL error introduced by r26581: Column 'account_id' in where clause is ambiguous --> happens if account-repository is in ldap" --- addressbook/inc/class.addressbook_sql.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_sql.inc.php b/addressbook/inc/class.addressbook_sql.inc.php index 654ec1e8cd..6a6213de3a 100644 --- a/addressbook/inc/class.addressbook_sql.inc.php +++ b/addressbook/inc/class.addressbook_sql.inc.php @@ -407,7 +407,8 @@ class addressbook_sql extends so_sql } } // add join to show only active accounts (only if accounts are shown and in sql and we not already join the accounts table, eg. used by admin) - if (!$owner && substr($this->account_repository,0,3) == 'sql' && strpos($join,$GLOBALS['egw']->accounts->backend->table) === false) + if (!$owner && substr($this->account_repository,0,3) == 'sql' && + strpos($join,$GLOBALS['egw']->accounts->backend->table) === false && !array_key_exists('account_id',$filter)) { $join .= self::ACOUNT_ACTIVE_JOIN; $filter[] = str_replace('UNIX_TIMESTAMP(NOW())',time(),self::ACOUNT_ACTIVE_FILTER);