From 38076211cc13609fd00fa9e9fd750bdca5f9c64b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 2 Feb 2012 15:01:38 +0000 Subject: [PATCH] Make sure letter filter doesn't persist --- addressbook/inc/class.addressbook_ui.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 2ce6bad7b0..42a3ed696f 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -1111,6 +1111,19 @@ class addressbook_ui extends addressbook_bo { // remove previous addEmail() calls, otherwise they will be run again egw_framework::set_onload(preg_replace('/addEmail\([^)]+\);/','',egw_framework::set_onload()),true); } + + // Make sure old lettersearch filter doesn't stay - current letter filter will be added later + foreach($query['col_filter'] as $key => $col_filter) + { + if(!is_numeric($key)) continue; + if(preg_match('/'.$GLOBALS['egw']->db->capabilities['case_insensitive_like']. + ' '.$GLOBALS['egw']->db->quote('[a-z]%').'$/',$col_filter) == 1 + ) + { + unset($query['col_filter'][$key]); + } + } + //echo "

uicontacts::get_rows(".print_r($query,true).")

\n"; if (!$id_only) {