aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/videolist/delete.php2
-rw-r--r--lib/videolist.php24
-rw-r--r--views/default/page/elements/videolist_block.php3
3 files changed, 15 insertions, 14 deletions
diff --git a/actions/videolist/delete.php b/actions/videolist/delete.php
index 191d7546c..0b9724c52 100644
--- a/actions/videolist/delete.php
+++ b/actions/videolist/delete.php
@@ -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);
}
diff --git a/lib/videolist.php b/lib/videolist.php
index bb114b298..c30916773 100644
--- a/lib/videolist.php
+++ b/lib/videolist.php
@@ -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;
}
diff --git a/views/default/page/elements/videolist_block.php b/views/default/page/elements/videolist_block.php
index 264862ccf..77ad75ab8 100644
--- a/views/default/page/elements/videolist_block.php
+++ b/views/default/page/elements/videolist_block.php
@@ -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) {