diff --git a/comment/lib.php b/comment/lib.php index be5c983699b..2878725c12f 100644 --- a/comment/lib.php +++ b/comment/lib.php @@ -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 .= '
'; for ($p=0; $p<$pages; $p++) { - $extra = ''; if ($p == $page) { - $class = ' curpage '; + $class = 'curpage'; + } else { + $class = 'pageno'; } - $str .= ''.($p+1).' '; + $str .= ''.($p+1).' '; } $str .= '
'; } diff --git a/theme/base/style/core.css b/theme/base/style/core.css index 22a56889d2d..41306cc3ee3 100644 --- a/theme/base/style/core.css +++ b/theme/base/style/core.css @@ -314,8 +314,8 @@ table.mod_index {width:100%;} .comment-list {font-size: 11px;overflow:auto;list-style:none;padding:0;margin:0;} .comment-list li {margin: 2px;margin-bottom:5px;clear:both;} .comment-paging{text-align:center;} -.comment-paging .pageno{padding: 2px;} -.comment-paging .curpage{border:1px solid grey} +.comment-paging .pageno{padding:2px;} +.comment-paging .curpage{border:1px solid #CCC;} .comment-userpicture {width: 20px;float:left;} .comment-content {margin-left: 22px;} .comment-content div {margin:0;padding:0;}