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

Commit

Permalink
PWK-427 fix contact phones without type phone (for omd-ubd3) also for…
Browse files Browse the repository at this point in the history
… actors
  • Loading branch information
svenhoutmeyers committed Aug 16, 2016
1 parent e3befc2 commit 994f05b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions culturefeed_agenda/theme/theme.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1069,18 +1069,17 @@ function _culturefeed_agenda_preprocess_actor(&$variables) {
$phones = array();
$faxes = array();
foreach ($contact_info->getPhones() as $phone) {
if ($phone->getType() == CultureFeed_Cdb_Data_Phone::PHONE_TYPE_PHONE) {
if(isset($variables['device']) && $variables['device'] == 'phone')
{
$phones[] = l($phone->getNumber(), 'tel:'.culturefeed_valid_phone($phone->getNumber()));
if ($phone->getType() == CultureFeed_Cdb_Data_Phone::PHONE_TYPE_FAX) {
$faxes[] = $phone->getNumber();
}
else {
if (isset($variables['device']) && $variables['device'] == 'phone') {
$phones[] = l($phone->getNumber(), 'tel:' . culturefeed_valid_phone($phone->getNumber()));
}
else {
$phones[] = $phone->getNumber();
}
}
else {
$faxes[] = $phone->getNumber();
}
}
$variables['contact']['phone'] = check_plain(implode(', ', $phones));
$variables['contact']['fax'] = check_plain(implode(', ', $faxes));
Expand Down

0 comments on commit 994f05b

Please sign in to comment.