Skip VLV if a group is selected; show advanced search form if activating a 'searchonly' address book
| | |
| | | $this->_debug("C: Search [$filter]"); |
| | | |
| | | // when using VLV, we get the total count by... |
| | | if (!$count && $function != 'ldap_read' && $this->prop['vlv']) { |
| | | if (!$count && $function != 'ldap_read' && $this->prop['vlv'] && !$this->group_id) { |
| | | // ...either reading numSubOrdinates attribute |
| | | if ($this->prop['numsub_filter'] && ($result_count = @$function($this->conn, $this->base_dn, $this->prop['numsub_filter'], array('numSubOrdinates'), 0, 0, 0))) { |
| | | $counts = ldap_get_entries($this->conn, $result_count); |
| | |
| | | // get contacts for this user |
| | | $result = $CONTACTS->list_records(array('name')); |
| | | |
| | | if (!$result->count && $result->searchonly) |
| | | if (!$result->count && $result->searchonly) { |
| | | $OUTPUT->show_message('contactsearchonly', 'notice'); |
| | | $OUTPUT->command('command', 'advanced-search'); |
| | | } |
| | | } |
| | | |
| | | // update message count display |