]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Using https instead http.
authorSem <sembrestels@riseup.net>
Thu, 7 Nov 2013 03:50:54 +0000 (04:50 +0100)
committerSem <sembrestels@riseup.net>
Thu, 7 Nov 2013 03:50:54 +0000 (04:50 +0100)
lib/Videolist/Platform/Bliptv.php
lib/Videolist/Platform/Metacafe.php
lib/Videolist/Platform/Vimeo.php
lib/Videolist/Platform/Youtube.php
start.php
views/default/videolist/watch/bliptv.php
views/default/videolist/watch/metacafe.php
views/default/videolist/watch/vimeo.php

index aa53032f9a1f542220f0033cc56b61a95becb67e..62cefbd3960342b335a5d8023f8f6e1dc47c977e 100644 (file)
@@ -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(
index 7da6d1647d677464f82885e3086f604cca055827..74a346b348e3eb77ed45410fea6eb746995d412f 100644 (file)
@@ -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(
index a4a1f275c7cae3e81d80aef6fda24e94338af955..6930cdb2d55b46da75d479b4a19ac34e01838966 100644 (file)
@@ -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();
index d5a388356d4b33f4134e23a26e48a44d71b83135..31a4bc95052872e2c2b91598c5fb763f5433d663 100644 (file)
@@ -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",
         );
     }
 }
index 877992b1a0c5ee8f44e705ddf3f1c6fbd4fb1612..2094ffaccc0977138b546a94cb4be15f32184079 100644 (file)
--- 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;
 }
index 241cf791be9e6a82265f0cb84ccfb1ca9851fe5f..ae3d75901e8ce5f1cd030eaef4183c646fa7818b 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
 $embedurl = $vars['entity']->embedurl;
+$embedurl = preg_replace('/https?:/', 'https:', $embedurl);
 
 echo "<iframe src=\"$embedurl\" frameborder=\"0\" allowfullscreen></iframe>";
index 40b632cf62b8cba9f3182d597b8567575b9e628f..ce8e257d5c3ac8e2f2fe9345021920ca729e6cdc 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
 $embedurl = $vars['entity']->embedurl;
+$embedurl = preg_replace('/https?:/', 'https:', $embedurl);
 
 echo "<embed flashVars=\"playerVars=autoPlay=no\" src=\"$embedurl\" wmode=\"transparent\" allowFullScreen=\"true\" allowScriptAccess=\"always\" name=\"Metacafe_$video_id\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed>";
index d3ffd439169073ff5bc009c91b86f7b74ee420d7..cdb4b6bfbc62cd3eaa2f33d2c960c254770d778d 100644 (file)
@@ -2,4 +2,4 @@
 
 $video_id = $vars['entity']->video_id;
 
-echo "<iframe src=\"http://player.vimeo.com/video/$video_id?byline=0\" frameborder=\"0\" webkitAllowFullScreen allowFullScreen></iframe>";
+echo "<iframe src=\"https://player.vimeo.com/video/$video_id?byline=0\" frameborder=\"0\" webkitAllowFullScreen allowFullScreen></iframe>";