]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19799 Converted calls to print_paging_bar
authornicolasconnault <nicolasconnault>
Fri, 7 Aug 2009 01:38:36 +0000 (01:38 +0000)
committernicolasconnault <nicolasconnault>
Fri, 7 Aug 2009 01:38:36 +0000 (01:38 +0000)
comment/lib.php
lib/commentlib.php
lib/tablelib.php

index b7ab9391c15ebc30c83e514225c69251b105cff6..921c6df471ba8cde47cc47b0dc11f263ffe0d964 100644 (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'));
     }
 
     /**
index b76be189c09e50f304bcccbad205961b9fb4e2d3..38c9e1535ff54fb1cbeaef5ea7cea3c28962b6d2 100644 (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.'&amp;', $pagevar='page', false, true);
+            return $OUTPUT->paging_bar(moodle_paging_bar::make($count, $page, $CFG->commentsperpage, $this->link));
         } else {
             // return ajax paging bar
             $str = '';
index 0419a8917c82feed08a54d4c352f87d066d5ccff..e6c6d27250cd8fb5750e83624d414b1a8a505699 100644 (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();