Autocomplete refactoring: replace variable name '$id' with '$abook_id'

Reason:
Having genericly named variable $id in nested loops makes code unreadable.
Replacing generic name '$id' with '$ENTITIY_id' format removes all ambiguity.
pull/6833/head
Bostjan Skufca 8 years ago committed by Aleksander Machniak
parent 1123f39cf4
commit 9b8db4c9e0

@ -65,8 +65,8 @@ if (!empty($book_types) && strlen($search)) {
$search_lc = mb_strtolower($search);
$mode |= rcube_addressbook::SEARCH_GROUPS;
foreach ($book_types as $id) {
$abook = $RCMAIL->get_address_book($id);
foreach ($book_types as $abook_id) {
$abook = $RCMAIL->get_address_book($abook_id);
$abook->set_pagesize($MAXNUM);
if ($result = $abook->search($RCMAIL->config->get('contactlist_fields'), $search, $mode, true, true, 'email')) {
@ -141,7 +141,7 @@ if (!empty($book_types) && strlen($search)) {
'email' => $email,
'type' => 'group',
'id' => $group['ID'],
'source' => $id,
'source' => $abook_id,
);
if (count($contacts) >= $MAXNUM) {
@ -158,7 +158,7 @@ if (!empty($book_types) && strlen($search)) {
'name' => $group['name'] . ' (' . intval($result->count) . ')',
'type' => 'group',
'id' => $group['ID'],
'source' => $id
'source' => $abook_id,
);
if (count($contacts) >= $MAXNUM) {

Loading…
Cancel
Save