]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Solved some issues.
authorSem <sembrestels@riseup.net>
Wed, 9 Nov 2011 23:11:53 +0000 (00:11 +0100)
committerSem <sembrestels@riseup.net>
Wed, 9 Nov 2011 23:11:53 +0000 (00:11 +0100)
actions/videolist/delete.php
lib/videolist.php
views/default/page/elements/videolist_block.php

index 191d7546ca49c053dd35938fb819358c9299e179..0b9724c52c92d2bb97462a37f53585971cd5f792 100644 (file)
@@ -28,7 +28,7 @@ if (!$videolist_item->delete()) {
 }
 
 // we can't come back to video url because it's deleted
-if($url != REFERER) {
+if($url != $_SERVER['HTTP_REFERER']) {
        forward(REFERER);
 }
 
index bb114b29882e8dcdd39909eede6f63a7e1abe036..c309167731b10f429d9a7ad99c0124c790f14d6a 100644 (file)
@@ -107,7 +107,7 @@ function videolist_get_data_youtube($video_id){
        
        return array(
                'title' => sanitize_string($xml->title),
-               'description' => sanitize_string($xml->content),
+               'description' => strip_tags($xml->content),
                'thumbnail' => "http://img.youtube.com/vi/$video_id/default.jpg",
                'video_id' => $video_id,
                'videotype' => 'youtube',
@@ -123,22 +123,22 @@ function videolist_get_data_vimeo($video_id){
        
        return array(
                'title' => sanitize_string($video->title),
-               'description' => sanitize_string($video->description),
+               'description' => strip_tags($video->description),
                'thumbnail' => sanitize_string($video->thumbnail_medium),
                'video_id' => $video_id,
                'videotype' => 'vimeo',
        );
 }
 
-function videolist_get_data_metacafe($video_id){ //FIXME
+function videolist_get_data_metacafe($video_id){
        $buffer = file_get_contents("http://www.metacafe.com/api/item/$video_id");
        $xml = new SimpleXMLElement($buffer);
        
        return array(
-               'title' => current($xml->xpath('/rss/channel/item/title')),
-               'description' => current($xml->xpath('/rss/channel/item/description')),
-               'thumbnail' => current($xml->xpath('/rss/channel/item/media:thumbnail/@url')),
-               'embedurl' => current($xml->xpath('/rss/channel/item/media:content/@url')),
+               'title' => sanitize_string(current($xml->xpath('/rss/channel/item/title'))),
+               'description' => strip_tags(current($xml->xpath('/rss/channel/item/description'))),
+               'thumbnail' => sanitize_string(current($xml->xpath('/rss/channel/item/media:thumbnail/@url'))),
+               'embedurl' => sanitize_string(current($xml->xpath('/rss/channel/item/media:content/@url'))),
                'video_id' => $video_id,
                'videotype' => 'metacafe',
        );
@@ -149,10 +149,10 @@ function videolist_get_data_bliptv($video_id){
        $xml = new SimpleXMLElement($buffer);
        
        return array(
-               'title' => current($xml->xpath('/rss/channel/item/title')),
-               'description' => current($xml->xpath('/rss/channel/item/description')),
-               'thumbnail' => current($xml->xpath('/rss/channel/item/media:thumbnail/@url')),
-               'embedurl' => current($xml->xpath('/rss/channel/item/blip:embedUrl')),
+               'title' => sanitize_string(current($xml->xpath('/rss/channel/item/title'))),
+               'description' => strip_tags(current($xml->xpath('/rss/channel/item/description'))),
+               'thumbnail' => sanitize_string(current($xml->xpath('/rss/channel/item/media:thumbnail/@url'))),
+               'embedurl' => sanitize_string(current($xml->xpath('/rss/channel/item/blip:embedUrl'))),
                'video_id' => $video_id,
                'videotype' => 'bliptv',
        );
@@ -166,7 +166,7 @@ function videolist_get_data_gisstv($video_id){
        foreach($xml->xpath('/rss/channel/item') as $item){
                if(sanitize_string($item->link) == 'http://giss.tv/dmmdb//contents/'.$video_id) {
                        $data['title'] = sanitize_string($item->title);
-                       $data['description'] = sanitize_string($item->description);
+                       $data['description'] = strip_tags($item->description);
                        $data['thumbnail'] = sanitize_string($item->thumbnail);
                        break;
                }
index 264862ccf751021668fca0ab70c521fc799b7c4a..77ad75ab88e758301200290f65e8e0873a9699cb 100644 (file)
@@ -14,10 +14,11 @@ $container = get_entity($container_guid);
 
 $options = array(
        'container_guid' => $container_guid,
-       'limit' => elgg_extract('limit', $vars, 4),
+       'limit' => elgg_extract('limit', $vars, 6),
        'type' => 'object',
        'subtypes' => 'videolist_item',
        'full_view' => false,
+       'pagination' => false,
 );
 
 if($container) {