From dfa8e97fb63983674fe7cc03e256f9ceb384c195 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 21 Feb 2013 16:04:15 +0000 Subject: [PATCH] * Addressbook: fix problem regarding deleted entries found in org_view, when type filter is set to all --- addressbook/inc/class.addressbook_so.inc.php | 10 +++++++++- addressbook/inc/class.addressbook_ui.inc.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_so.inc.php b/addressbook/inc/class.addressbook_so.inc.php index 590ec576cd..4f6577228b 100755 --- a/addressbook/inc/class.addressbook_so.inc.php +++ b/addressbook/inc/class.addressbook_so.inc.php @@ -620,7 +620,6 @@ class addressbook_so { unset($filter['tid']); // return all entries incl. deleted } - $backend = $this->get_backend(null,$filter['owner']); // single string to search for --> create so_sql conformant search criterial for the standard search columns if ($criteria && !is_array($criteria)) @@ -738,6 +737,15 @@ class addressbook_so { $param['search'] = $this->data2db($param['search']); } + if(!array_key_exists('tid', $param['col_filter']) || $param['col_filter']['tid'] === '') + { + $param['col_filter'][] = 'contact_tid != \'' . self::DELETED_TYPE . '\''; + } + elseif(is_null($param['col_filter']['tid'])) + { + unset($param['col_filter']['tid']); // return all entries incl. deleted + } + $rows = $this->somain->organisations($param); $this->total = $this->somain->total; //echo "

socontacts::organisations(".print_r($param,true).")
".$this->somain->db->Query_ID->sql."

\n"; diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index bc09174000..7cf470fc99 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -1667,7 +1667,7 @@ class addressbook_ui extends addressbook_bo egw_link::link('addressbook',$content['id'],$links); } $content['js'] = "opener.egw_refresh('".str_replace("'","\\'",$content['msg'])."','addressbook',{$content['id']}); if(opener.egw_getAppName() != 'addressbook') { opener.egw_refresh('".str_replace("'","\\'",$content['msg'])."','addressbook',{$content['id']},null,'addressbook');}"; -error_log($GLOBALS['egw_info']['flags']['currentapp']); + if ($button == 'save') { $content['js'] .= ' window.close();';