mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
"MDL-21943, fixed paging class name"
This commit is contained in:
parent
b1d124d1df
commit
c794595d5f
2 changed files with 10 additions and 6 deletions
|
@ -87,6 +87,10 @@ class comment {
|
|||
public function __construct($options) {
|
||||
global $CFG, $DB;
|
||||
|
||||
if (empty($CFG->commentsperpage)) {
|
||||
$CFG->commentsperpage = 15;
|
||||
}
|
||||
|
||||
$this->viewcap = false;
|
||||
$this->postcap = false;
|
||||
|
||||
|
@ -371,7 +375,6 @@ EOD;
|
|||
if (empty($this->viewcap)) {
|
||||
return false;
|
||||
}
|
||||
$CFG->commentsperpage = 15;
|
||||
if (!is_numeric($page)) {
|
||||
$page = 0;
|
||||
}
|
||||
|
@ -439,11 +442,12 @@ EOD;
|
|||
$str = '';
|
||||
$str .= '<div class="comment-paging" id="comment-pagination-'.$this->cid.'">';
|
||||
for ($p=0; $p<$pages; $p++) {
|
||||
$extra = '';
|
||||
if ($p == $page) {
|
||||
$class = ' curpage ';
|
||||
$class = 'curpage';
|
||||
} else {
|
||||
$class = 'pageno';
|
||||
}
|
||||
$str .= '<a class="pageno '.$class.'" href="###" id="comment-page-'.$this->cid.'-'.$p.'">'.($p+1).'</a> ';
|
||||
$str .= '<a class="'.$class.'" href="###" id="comment-page-'.$this->cid.'-'.$p.'">'.($p+1).'</a> ';
|
||||
}
|
||||
$str .= '</div>';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue