mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
reset lettersearch if viewing the contacts of one organisation
This commit is contained in:
parent
91480e8acc
commit
e01d9cb8af
@ -425,10 +425,10 @@ class uicontacts extends bocontacts
|
|||||||
//echo "<p>uicontacts::get_rows(".print_r($query,true).")</p>\n";
|
//echo "<p>uicontacts::get_rows(".print_r($query,true).")</p>\n";
|
||||||
if (!$id_only)
|
if (!$id_only)
|
||||||
{
|
{
|
||||||
|
$old_state = $GLOBALS['egw']->session->appsession('index','addressbook');
|
||||||
// check if accounts are stored in ldap, which does NOT yet support the org-views
|
// check if accounts are stored in ldap, which does NOT yet support the org-views
|
||||||
if ($this->so_accounts && $query['filter'] === '0' && $query['org_view'])
|
if ($this->so_accounts && $query['filter'] === '0' && $query['org_view'])
|
||||||
{
|
{
|
||||||
$old_state = $GLOBALS['egw']->session->appsession('index','addressbook');
|
|
||||||
if ($old_state['filter'] === '0') // user changed to org_view
|
if ($old_state['filter'] === '0') // user changed to org_view
|
||||||
{
|
{
|
||||||
$query['filter'] = ''; // --> change filter to all contacts
|
$query['filter'] = ''; // --> change filter to all contacts
|
||||||
@ -437,8 +437,12 @@ class uicontacts extends bocontacts
|
|||||||
{
|
{
|
||||||
$query['org_view'] = ''; // --> change to regular contacts view
|
$query['org_view'] = ''; // --> change to regular contacts view
|
||||||
}
|
}
|
||||||
unset($old_state);
|
|
||||||
}
|
}
|
||||||
|
if ($query['org_view'] && isset($this->org_views[$old_state['org_view']]) && !isset($this->org_views[$query['org_view']]))
|
||||||
|
{
|
||||||
|
$query['searchletter'] = ''; // reset lettersearch if viewing the contacts of one organisation
|
||||||
|
}
|
||||||
|
unset($old_state);
|
||||||
$GLOBALS['egw']->session->appsession($do_email ? 'email' : 'index','addressbook',$query);
|
$GLOBALS['egw']->session->appsession($do_email ? 'email' : 'index','addressbook',$query);
|
||||||
// save the state of the index in the user prefs
|
// save the state of the index in the user prefs
|
||||||
$state = serialize(array(
|
$state = serialize(array(
|
||||||
|
Loading…
Reference in New Issue
Block a user