Skip to content

Commit

Permalink
BUGFIX: added &format=5 to the default search query to restrict resul…
Browse files Browse the repository at this point in the history
…ts to videos that the author has chosen to allow to embed in third-party websites.

git-svn-id: http://svn.silverstripe.com/open/modules/youtubeservice/trunk@95006 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
jseide committed Dec 11, 2009
1 parent 93dbdb9 commit a82e0ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/YoutubeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function errorCatch($response){
* @param orderby - Sorting method. The possible valus are relevance, updated, published, viewCount, rating
* @return DataObjectSet
*/
function getVideosFeed($method=NULL, $params=array(), $max_results=NULL, $start_index=NULL, $orderby=NULL){
function getVideosFeed($method=NULL, $params=array(), $max_results=NULL, $start_index=NULL, $orderby=NULL, $format="5"){
if(array_key_exists($orderby, self::$sortby_processing)) {
$default_params = array(
'max-results' => 50, // maximum number allowed by GData API
Expand All @@ -101,7 +101,8 @@ function getVideosFeed($method=NULL, $params=array(), $max_results=NULL, $start_
$default_params = array(
'max-results' => $max_results,
'start-index' => $start_index,
'orderby' => $orderby
'orderby' => $orderby,
'format' => $format
);
}

Expand Down

0 comments on commit a82e0ba

Please sign in to comment.