diff --git a/phpgwapi/inc/class.contacts_shared.inc.php b/phpgwapi/inc/class.contacts_shared.inc.php index 0e1775a9e0..9a4ee09a1b 100644 --- a/phpgwapi/inc/class.contacts_shared.inc.php +++ b/phpgwapi/inc/class.contacts_shared.inc.php @@ -37,7 +37,7 @@ while (list($field,$value) = @each($fields)) { /* Depending on how the array was built, this is needed. */ - if (gettype($value) == "integer") + if (gettype($value) == 'integer') { $value = $field; } @@ -68,7 +68,7 @@ /* This will take an array or integer */ function delete($id) { - if (gettype($id) == "array") + if (gettype($id) == 'array') { while (list($null,$t_id) = each($id)) { @@ -189,11 +189,12 @@ function filter_ldap ($ldap_fields,$filterfields,$DEBUG=0) { $match = 0; - if($DEBUG) { echo "
"; } - for($i=0;$i'; } + for($i=0;$i"; } + if($DEBUG) { echo $ldap_fields[$i]['uidnumber'][0].' matched all!'.'
'; } $new_ldap[] = $ldap_fields[$i]; } else { - if($DEBUG) { echo $ldap_fields[$i]["uidnumber"][0].' did not match all.'."
"; } + if($DEBUG) { echo $ldap_fields[$i]['uidnumber'][0].' did not match all.'.'
'; } } } } @@ -279,12 +280,9 @@ function formatted_address($id = '',$fields = '',$business = True) { - global $phpgw,$phpgw_info; - - $font = $phpgw_info['theme']['font']; - - $t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('addressbook')); + $font = $GLOBALS['phpgw_info']['theme']['font']; + $t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook')); $s = CreateObject('phpgwapi.sbox'); $address = $this->read_single_entry($id,$fields); @@ -296,24 +294,24 @@ if ($business) { - $street = $address[0]['adr_one_street']; - $city = $address[0]['adr_one_locality']; - $zip = $address[0]['adr_one_postalcode']; - $state = $address[0]['adr_one_region']; + $street = $address[0]['adr_one_street']; + $city = $address[0]['adr_one_locality']; + $zip = $address[0]['adr_one_postalcode']; + $state = $address[0]['adr_one_region']; $country = $address[0]['adr_one_countryname']; } else { - $street = $address[0]['adr_two_street']; - $city = $address[0]['adr_two_locality']; - $zip = $address[0]['adr_two_postalcode']; - $state = $address[0]['adr_two_region']; + $street = $address[0]['adr_two_street']; + $city = $address[0]['adr_two_locality']; + $zip = $address[0]['adr_two_postalcode']; + $state = $address[0]['adr_two_region']; $country = $address[0]['adr_two_countryname']; } if (! $country) { - $country = $phpgw_info['user']['preferences']['common']['country']; + $country = $GLOBALS['phpgw_info']['user']['preferences']['common']['country']; } if (file_exists(PHPGW_SERVER_ROOT . SEP . 'addressbook' . SEP . 'templates' . SEP .'default' . SEP . 'format_' . strtolower($country) . '.tpl'))