Skip to content

Commit

Permalink
adding website as a media type for links
Browse files Browse the repository at this point in the history
  • Loading branch information
svenhoutmeyers committed Sep 17, 2013
1 parent b8b267b commit 2c44871
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions culturefeed_agenda/includes/helpers.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ function _culturefeed_agenda_get_links_from_item(CultureFeed_Cdb_Item_Base $item
$links = array();
// General links.
if ($detail) {
$media_links = $detail->getMedia()->byMediaType(CultureFeed_Cdb_Data_File::MEDIA_TYPE_WEBRESOURCE);
foreach ($media_links as $media_link) {
$links[] = $media_link->getHLink();

foreach ($detail->getMedia() as $media) {
if ($media->getMediaType() == CultureFeed_Cdb_Data_File::MEDIA_TYPE_WEBRESOURCE || $media->getMediaType() == CultureFeed_Cdb_Data_File::MEDIA_TYPE_WEBSITE) {
$links[] = $media->getHLink();
}
}
}

Expand Down

0 comments on commit 2c44871

Please sign in to comment.