MDL-44560 glossary: Fix pagination on glossary category view
Credit to Sebastian B for this fix
This commit is contained in:
@@ -267,7 +267,13 @@
|
||||
}
|
||||
break;
|
||||
}
|
||||
$count = $DB->count_records_sql("SELECT COUNT(DISTINCT(ge.id)) $sqlfrom $sqlwhere", $params);
|
||||
|
||||
$count = 0;
|
||||
if ($tab == GLOSSARY_CATEGORY_VIEW && $hook == GLOSSARY_SHOW_ALL_CATEGORIES) {
|
||||
$count = $DB->count_records_sql("SELECT COUNT(ge.id) $sqlfrom $sqlwhere", $params);
|
||||
} else {
|
||||
$count = $DB->count_records_sql("SELECT COUNT(DISTINCT(ge.id)) $sqlfrom $sqlwhere", $params);
|
||||
}
|
||||
|
||||
$limitfrom = $offset;
|
||||
$limitnum = 0;
|
||||
|
||||
Reference in New Issue
Block a user