mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 11:46:19 +01:00
MDL-44345 repository_youtube: Endless loop when reaching last results
This commit is contained in:
parent
76e4de31cc
commit
eaafde6ec0
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user