fixed freetime-search: used only the first participant

This commit is contained in:
Ralf Becker 2005-12-02 16:43:23 +00:00
parent 0e57eee003
commit 0f9c892d96
2 changed files with 8 additions and 6 deletions

View File

@ -265,11 +265,12 @@ class bocal
$users = array();
foreach($params['users'] as $user)
{
if (in_array($user,$users)) continue; // already added
if ($params['ignore_acl'] || $this->check_perms(EGW_ACL_READ,0,$user))
{
$users[] = $user;
if (!in_array($user,$users)) // already added?
{
$users[] = $user;
}
}
elseif ($GLOBALS['egw']->accounts->get_type($user) != 'g')
{

View File

@ -160,12 +160,13 @@ function values2url(form,names)
//alert('found '+element.name+', value='+element.value);
if (element.type == 'checkbox' || element.type == 'radio') { // checkbox or radio
if (element.checked) url += '&'+element.name+'='+element.value;
} else if (element.value != null) {
url += '&'+element.name+'='+element.value;
} else if (element.options) { // selectbox
for(opt=0; opt < element.options.length; opt++) {
if (element.options[opt].selected) url += '&'+element.name+'[]='+element.options[opt].value;
//alert('found '+element.name+' option['+opt+'] = '+element.options[opt].value+ ' = '.element.options[opt].text+': '+element.options[opt].selected);
if (element.options[opt].selected) url += '&'+element.name+(element.name.indexOf('[]') >= 0 ? '=' : '[]=')+element.options[opt].value;
}
} else if (element.value != null) {
url += '&'+element.name+'='+element.value;
}
}
}