Merged fixes for MDL-7425 from 1.8 stable
This commit is contained in:
+5
-1
@@ -342,7 +342,11 @@
|
||||
// be moved up and down beyond the paging border
|
||||
if ($totalcount > $perpage) {
|
||||
$atfirstpage = ($page == 0);
|
||||
$atlastpage = (($page + 1) == ceil($totalcount / $perpage));
|
||||
if ($perpage > 0) {
|
||||
$atlastpage = (($page + 1) == ceil($totalcount / $perpage));
|
||||
} else {
|
||||
$atlastpage = true;
|
||||
}
|
||||
} else {
|
||||
$atfirstpage = true;
|
||||
$atlastpage = true;
|
||||
|
||||
+5
-1
@@ -5665,7 +5665,11 @@ function print_paging_bar($totalcount, $page, $perpage, $baseurl, $pagevar='page
|
||||
$output .= ' (<a href="'. $baseurl->out(false, array($pagevar => $pagenum)).'">'. get_string('previous') .'</a>) ';
|
||||
}
|
||||
}
|
||||
$lastpage = ceil($totalcount / $perpage);
|
||||
if ($perpage > 0) {
|
||||
$lastpage = ceil($totalcount / $perpage);
|
||||
} else {
|
||||
$lastpage = 1;
|
||||
}
|
||||
if ($page > 15) {
|
||||
$startpage = $page - 10;
|
||||
if (!is_a($baseurl, 'moodle_url')){
|
||||
|
||||
Reference in New Issue
Block a user