Merge branch 'MDL-44345-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Sam Hemelryk 2014-03-12 11:21:48 +13:00 committed by Eloy Lafuente (stronk7)
commit 5f2fcc388b

View File

@ -89,7 +89,8 @@ class repository_youtube extends repository {
$ret['list'] = $this->_get_collection($search_text, $start, $max, $sort);
$ret['norefresh'] = true;
$ret['nosearch'] = true;
$ret['pages'] = -1;
// If the number of results is smaller than $max, it means we reached the last page.
$ret['pages'] = (count($ret['list']) < $max) ? $ret['page'] : -1;
return $ret;
}