mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-31 11:09:04 +01:00
Calendar - Even better, just filter out accounts from contact results
This commit is contained in:
parent
77b90abd54
commit
bd595469ab
@ -142,7 +142,9 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
$query = $_REQUEST['query'];
|
$query = $_REQUEST['query'];
|
||||||
|
|
||||||
// Arbitrarily limited to 50 / resource
|
// Arbitrarily limited to 50 / resource
|
||||||
$options = array('start' => 0, 'num_rows' => 50) +
|
$options = array('start' => 0, 'num_rows' => 50,
|
||||||
|
// Filter accounts out of addressbook
|
||||||
|
'filter' => array('account_id' => null)) +
|
||||||
array_diff_key($_REQUEST, array_flip(array('menuaction','query')));
|
array_diff_key($_REQUEST, array_flip(array('menuaction','query')));
|
||||||
$results = array();
|
$results = array();
|
||||||
|
|
||||||
@ -182,14 +184,6 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
// There are always special cases
|
// There are always special cases
|
||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case 'c':
|
|
||||||
// Remove contacts matching excluded accounts
|
|
||||||
foreach($remove_contacts as $key => $title)
|
|
||||||
{
|
|
||||||
$contact_id = Api\Accounts::id2name($key, 'person_id');
|
|
||||||
unset($_results[$contact_id]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'l':
|
case 'l':
|
||||||
// Include mailing lists
|
// Include mailing lists
|
||||||
$contacts_obj = new Api\Contacts();
|
$contacts_obj = new Api\Contacts();
|
||||||
|
Loading…
Reference in New Issue
Block a user