MDL-19808 Converted calls to print_paging_bar

This commit is contained in:
nicolasconnault 2009-08-07 01:37:44 +00:00
parent aa19416521
commit 4e412c459d
3 changed files with 10 additions and 10 deletions

View File

@ -5527,7 +5527,7 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $di
$numdiscussions = forum_get_discussions_count($cm);
///Show the paging bar
print_paging_bar($numdiscussions, $page, $perpage, "view.php?f=$forum->id&");
echo $OUTPUT->paging_bar(moodle_paging_bar::make($numdiscussions, $page, $perpage, "view.php?f=$forum->id"));
if ($numdiscussions > 1000) {
// saves some memory on sites with very large forums
$replies = forum_count_discussion_replies($forum->id, $sort, $maxdiscussions, $page, $perpage);
@ -5667,7 +5667,7 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $di
}
if ($page != -1) { ///Show the paging bar
print_paging_bar($numdiscussions, $page, $perpage, "view.php?f=$forum->id&");
echo $OUTPUT->paging_bar(moodle_paging_bar::make($numdiscussions, $page, $perpage, "view.php?f=$forum->id"));
}
}

View File

@ -159,8 +159,9 @@
echo '</div>';
echo $OUTPUT->heading("$strsearchresults: $totalcount");
print_paging_bar($totalcount, $page, $perpage, "search.php?search=".urlencode($search)."&amp;id=$course->id&amp;perpage=$perpage&amp;");
$url = new moodle_url('search.php', array('search' => urlencode($search), 'id' => $course->id, 'perpage' => $perpage));
echo $OUTPUT->paging_bar(moodle_paging_bar::make($totalcount, $page, $perpage, $url));
//added to implement highlighting of search terms found only in HTML markup
//fiedorow - 9/2/2005
@ -236,7 +237,7 @@
$fulllink, $strippedsearch, -99, false);
}
print_paging_bar($totalcount, $page, $perpage, "search.php?search=".urlencode($search)."&amp;id=$course->id&amp;perpage=$perpage&amp;");
echo $OUTPUT->paging_bar(moodle_paging_bar::make($totalcount, $page, $perpage, $url));
echo $OUTPUT->footer();

View File

@ -96,9 +96,9 @@ if ($course->id == SITEID) {
// Get the posts.
if ($posts = forum_search_posts($searchterms, $searchcourse, $page*$perpage, $perpage,
$totalcount, $extrasql)) {
print_paging_bar($totalcount, $page, $perpage,
"user.php?id=$user->id&amp;course=$course->id&amp;mode=$mode&amp;perpage=$perpage&amp;");
$baseurl = new moodle_url('user.php', array('id' => $user->id, 'course' => $course->id, 'mode' => $mode, 'perpage' => $perpage));
echo $OUTPUT->paging_bar(moodle_paging_bar::make($totalcount, $page, $perpage, $baseurl));
$discussions = array();
$forums = array();
@ -165,8 +165,7 @@ if ($posts = forum_search_posts($searchterms, $searchcourse, $page*$perpage, $pe
echo "<br />";
}
print_paging_bar($totalcount, $page, $perpage,
"user.php?id=$user->id&amp;course=$course->id&amp;mode=$mode&amp;perpage=$perpage&amp;");
echo $OUTPUT->paging_bar(moodle_paging_bar::make($totalcount, $page, $perpage, $baseurl));
} else {
if ($mode == 'posts') {
echo $OUTPUT->heading(get_string('noposts', 'forum'));