From b02119c597a1d806e7910e63ba20139234249fa0 Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 7 Nov 2013 04:50:54 +0100 Subject: Using https instead http. --- lib/Videolist/Platform/Bliptv.php | 2 +- lib/Videolist/Platform/Metacafe.php | 2 +- lib/Videolist/Platform/Vimeo.php | 2 +- lib/Videolist/Platform/Youtube.php | 4 ++-- start.php | 2 +- views/default/videolist/watch/bliptv.php | 1 + views/default/videolist/watch/metacafe.php | 1 + views/default/videolist/watch/vimeo.php | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/Videolist/Platform/Bliptv.php b/lib/Videolist/Platform/Bliptv.php index aa53032f9..62cefbd39 100644 --- a/lib/Videolist/Platform/Bliptv.php +++ b/lib/Videolist/Platform/Bliptv.php @@ -25,7 +25,7 @@ class Videolist_Platform_Bliptv implements Videolist_PlatformInterface { $video_id = $parsed['video_id']; - $buffer = file_get_contents('http://blip.tv'.$video_id.'?skin=rss'); + $buffer = file_get_contents('https://blip.tv'.$video_id.'?skin=rss'); $xml = new SimpleXMLElement($buffer); return array( diff --git a/lib/Videolist/Platform/Metacafe.php b/lib/Videolist/Platform/Metacafe.php index 7da6d1647..74a346b34 100644 --- a/lib/Videolist/Platform/Metacafe.php +++ b/lib/Videolist/Platform/Metacafe.php @@ -25,7 +25,7 @@ class Videolist_Platform_Metacafe implements Videolist_PlatformInterface { $video_id = $parsed['video_id']; - $buffer = file_get_contents("http://www.metacafe.com/api/item/$video_id"); + $buffer = file_get_contents("https://www.metacafe.com/api/item/$video_id"); $xml = new SimpleXMLElement($buffer); return array( diff --git a/lib/Videolist/Platform/Vimeo.php b/lib/Videolist/Platform/Vimeo.php index a4a1f275c..6930cdb2d 100644 --- a/lib/Videolist/Platform/Vimeo.php +++ b/lib/Videolist/Platform/Vimeo.php @@ -25,7 +25,7 @@ class Videolist_Platform_Vimeo implements Videolist_PlatformInterface { $video_id = $parsed['video_id']; - $buffer = file_get_contents("http://vimeo.com/api/v2/video/$video_id.xml"); + $buffer = file_get_contents("https://vimeo.com/api/v2/video/$video_id.xml"); $xml = new SimpleXMLElement($buffer); $videos = $xml->children(); diff --git a/lib/Videolist/Platform/Youtube.php b/lib/Videolist/Platform/Youtube.php index d5a388356..31a4bc950 100644 --- a/lib/Videolist/Platform/Youtube.php +++ b/lib/Videolist/Platform/Youtube.php @@ -37,13 +37,13 @@ class Videolist_Platform_Youtube implements Videolist_PlatformInterface { $video_id = $parsed['video_id']; - $buffer = file_get_contents('http://gdata.youtube.com/feeds/api/videos/'.$video_id); + $buffer = file_get_contents('https://gdata.youtube.com/feeds/api/videos/'.$video_id); $xml = new SimpleXMLElement($buffer); return array( 'title' => $xml->title, 'description' => strip_tags($xml->content), - 'thumbnail' => "http://img.youtube.com/vi/$video_id/default.jpg", + 'thumbnail' => "https://img.youtube.com/vi/$video_id/default.jpg", ); } } diff --git a/start.php b/start.php index 877992b1a..2094ffacc 100644 --- a/start.php +++ b/start.php @@ -300,7 +300,7 @@ function videolist_preprocess_url($hook, $type, $returnvalue, $params) { $parsed = parse_url($returnvalue); if (empty($parsed['host']) && ! empty($parsed['path']) && $parsed['path'][0] !== '/') { // user probably forgot scheme - $returnvalue = 'http://' . $returnvalue; + $returnvalue = 'https://' . $returnvalue; } return $returnvalue; } diff --git a/views/default/videolist/watch/bliptv.php b/views/default/videolist/watch/bliptv.php index 241cf791b..ae3d75901 100644 --- a/views/default/videolist/watch/bliptv.php +++ b/views/default/videolist/watch/bliptv.php @@ -1,5 +1,6 @@ embedurl; +$embedurl = preg_replace('/https?:/', 'https:', $embedurl); echo ""; diff --git a/views/default/videolist/watch/metacafe.php b/views/default/videolist/watch/metacafe.php index 40b632cf6..ce8e257d5 100644 --- a/views/default/videolist/watch/metacafe.php +++ b/views/default/videolist/watch/metacafe.php @@ -1,5 +1,6 @@ embedurl; +$embedurl = preg_replace('/https?:/', 'https:', $embedurl); echo ""; diff --git a/views/default/videolist/watch/vimeo.php b/views/default/videolist/watch/vimeo.php index d3ffd4391..cdb4b6bfb 100644 --- a/views/default/videolist/watch/vimeo.php +++ b/views/default/videolist/watch/vimeo.php @@ -2,4 +2,4 @@ $video_id = $vars['entity']->video_id; -echo ""; +echo ""; -- cgit v1.2.3