changeset 19 | 3d72ae0968f4 |
parent 16 | a86126ab1dd4 |
18:be944660c56a | 19:3d72ae0968f4 |
---|---|
1801 { |
1801 { |
1802 $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
1802 $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
1803 } |
1803 } |
1804 if (isset($content['attribs']['']['fileSize'])) |
1804 if (isset($content['attribs']['']['fileSize'])) |
1805 { |
1805 { |
1806 $length = ceil($content['attribs']['']['fileSize']); |
1806 $length = intval($content['attribs']['']['fileSize']); |
1807 } |
1807 } |
1808 if (isset($content['attribs']['']['medium'])) |
1808 if (isset($content['attribs']['']['medium'])) |
1809 { |
1809 { |
1810 $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); |
1810 $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); |
1811 } |
1811 } |
2423 { |
2423 { |
2424 $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
2424 $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); |
2425 } |
2425 } |
2426 if (isset($content['attribs']['']['fileSize'])) |
2426 if (isset($content['attribs']['']['fileSize'])) |
2427 { |
2427 { |
2428 $length = ceil($content['attribs']['']['fileSize']); |
2428 $length = intval($content['attribs']['']['fileSize']); |
2429 } |
2429 } |
2430 if (isset($content['attribs']['']['medium'])) |
2430 if (isset($content['attribs']['']['medium'])) |
2431 { |
2431 { |
2432 $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); |
2432 $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); |
2433 } |
2433 } |
2788 { |
2788 { |
2789 $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
2789 $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
2790 } |
2790 } |
2791 if (isset($link['attribs']['']['length'])) |
2791 if (isset($link['attribs']['']['length'])) |
2792 { |
2792 { |
2793 $length = ceil($link['attribs']['']['length']); |
2793 $length = intval($link['attribs']['']['length']); |
2794 } |
2794 } |
2795 if (isset($link['attribs']['']['title'])) |
2795 if (isset($link['attribs']['']['title'])) |
2796 { |
2796 { |
2797 $title = $this->sanitize($link['attribs']['']['title'], SIMPLEPIE_CONSTRUCT_TEXT); |
2797 $title = $this->sanitize($link['attribs']['']['title'], SIMPLEPIE_CONSTRUCT_TEXT); |
2798 } |
2798 } |
2831 { |
2831 { |
2832 $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
2832 $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
2833 } |
2833 } |
2834 if (isset($link['attribs']['']['length'])) |
2834 if (isset($link['attribs']['']['length'])) |
2835 { |
2835 { |
2836 $length = ceil($link['attribs']['']['length']); |
2836 $length = intval($link['attribs']['']['length']); |
2837 } |
2837 } |
2838 |
2838 |
2839 // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor |
2839 // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor |
2840 $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width)); |
2840 $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width)); |
2841 } |
2841 } |
2860 $type = null; |
2860 $type = null; |
2861 $url = null; |
2861 $url = null; |
2862 $width = null; |
2862 $width = null; |
2863 |
2863 |
2864 $url = $this->sanitize($enclosure[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($enclosure[0])); |
2864 $url = $this->sanitize($enclosure[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($enclosure[0])); |
2865 $url = $this->feed->sanitize->https_url($url); |
|
2865 if (isset($enclosure[0]['attribs']['']['type'])) |
2866 if (isset($enclosure[0]['attribs']['']['type'])) |
2866 { |
2867 { |
2867 $type = $this->sanitize($enclosure[0]['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
2868 $type = $this->sanitize($enclosure[0]['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); |
2868 } |
2869 } |
2869 if (isset($enclosure[0]['attribs']['']['length'])) |
2870 if (isset($enclosure[0]['attribs']['']['length'])) |
2870 { |
2871 { |
2871 $length = ceil($enclosure[0]['attribs']['']['length']); |
2872 $length = intval($enclosure[0]['attribs']['']['length']); |
2872 } |
2873 } |
2873 |
2874 |
2874 // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor |
2875 // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor |
2875 $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width)); |
2876 $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width)); |
2876 } |
2877 } |