From 2c448716f3b610fe1531407158c34717e54dbaeb Mon Sep 17 00:00:00 2001 From: svenhoutmeyers Date: Tue, 17 Sep 2013 10:58:54 +0200 Subject: [PATCH] adding website as a media type for links --- culturefeed_agenda/includes/helpers.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/culturefeed_agenda/includes/helpers.inc b/culturefeed_agenda/includes/helpers.inc index c57992f3..dc7400bf 100644 --- a/culturefeed_agenda/includes/helpers.inc +++ b/culturefeed_agenda/includes/helpers.inc @@ -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(); + } } }