* LDAP: fix fatal error in minimal install

This commit is contained in:
Ralf Becker 2017-04-07 18:49:30 +02:00
parent c013210563
commit 500e212048

View File

@ -1376,7 +1376,7 @@ class Ldap
{
if ($data['c'])
{
$contact['adr_one_countryname'] = ExecMethod('phpgwapi.country.get_full_name',$data['c'][0]);
$contact['adr_one_countryname'] = Api\Country::get_full_name($data['c'][0]);
}
}
@ -1398,7 +1398,7 @@ class Ldap
}
elseif ($data['adr_one_countryname'])
{
$ldapContact['c'] = ExecMethod('phpgwapi.country.country_code',$data['adr_one_countryname']);
$ldapContact['c'] = Api\Country::country_code($data['adr_one_countryname']);
if ($ldapContact['c'] && strlen($ldapContact['c']) > 2) // Bad countryname when "custom" selected!
{
$ldapContact['c'] = array(); // should return error...
@ -1444,7 +1444,7 @@ class Ldap
}
elseif ($data['adr_one_countryname'])
{
$ldapContact['c'] = ExecMethod('phpgwapi.country.country_code',$data['adr_one_countryname']);
$ldapContact['c'] = Api\Country::country_code($data['adr_one_countryname']);
if ($ldapContact['c'] && strlen($ldapContact['c']) > 2) // Bad countryname when "custom" selected!
{
$ldapContact['c'] = array(); // should return error...