MDL-19799 Converted calls to print_paging_bar

This commit is contained in:
nicolasconnault
2009-08-07 01:38:36 +00:00
parent 4e412c459d
commit 25911860e3
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ class comment_manager {
$table->data[] = array($checkbox, $c->username, $c->content, $action);
}
print_table($table);
print_paging_bar($count, $page, $this->perpage, $CFG->wwwroot.'/comment/index.php?', 'page');
echo $OUTPUT->paging_bar(moodle_paging_bar::make($count, $page, $this->perpage, $CFG->wwwroot.'/comment/index.php'));
}
/**
+2 -2
View File
@@ -411,7 +411,7 @@ EOD;
}
public function get_pagination($page = 0) {
global $DB, $CFG;
global $DB, $CFG, $OUTPUT;
if (!$count = $DB->count_records_sql("SELECT COUNT(*) from {comments} c, {user} u WHERE u.id=c.userid AND c.contextid=? AND c.commentarea=? AND c.itemid=?", array($this->contextid, $this->commentarea, $this->itemid))) {
}
$pages = (int)ceil($count/$CFG->commentsperpage);
@@ -420,7 +420,7 @@ EOD;
}
if (!empty(self::$nonjs)) {
// used in non-js interface
return print_paging_bar($count, $page, $CFG->commentsperpage, $this->link.'&', $pagevar='page', false, true);
return $OUTPUT->paging_bar(moodle_paging_bar::make($count, $page, $CFG->commentsperpage, $this->link));
} else {
// return ajax paging bar
$str = '';
+1
View File
@@ -990,6 +990,7 @@ class flexible_table {
* This function is not part of the public api.
*/
function finish_html(){
global $OUTPUT;
if (!$this->started_output) {
//no data has been added to the table.
$this->print_nothing_to_display();