Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit 994f05b

Browse files
PWK-427 fix contact phones without type phone (for omd-ubd3) also for actors
1 parent e3befc2 commit 994f05b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

culturefeed_agenda/theme/theme.inc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,18 +1069,17 @@ function _culturefeed_agenda_preprocess_actor(&$variables) {
10691069
$phones = array();
10701070
$faxes = array();
10711071
foreach ($contact_info->getPhones() as $phone) {
1072-
if ($phone->getType() == CultureFeed_Cdb_Data_Phone::PHONE_TYPE_PHONE) {
1073-
if(isset($variables['device']) && $variables['device'] == 'phone')
1074-
{
1075-
$phones[] = l($phone->getNumber(), 'tel:'.culturefeed_valid_phone($phone->getNumber()));
1072+
if ($phone->getType() == CultureFeed_Cdb_Data_Phone::PHONE_TYPE_FAX) {
1073+
$faxes[] = $phone->getNumber();
1074+
}
1075+
else {
1076+
if (isset($variables['device']) && $variables['device'] == 'phone') {
1077+
$phones[] = l($phone->getNumber(), 'tel:' . culturefeed_valid_phone($phone->getNumber()));
10761078
}
10771079
else {
10781080
$phones[] = $phone->getNumber();
10791081
}
10801082
}
1081-
else {
1082-
$faxes[] = $phone->getNumber();
1083-
}
10841083
}
10851084
$variables['contact']['phone'] = check_plain(implode(', ', $phones));
10861085
$variables['contact']['fax'] = check_plain(implode(', ', $faxes));

0 commit comments

Comments
 (0)