Skip to content

Commit

Permalink
MDL-81287 mod_forum: observe default discussion paging value.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed May 15, 2024
1 parent 477aa7c commit dfde819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod/forum/classes/local/renderers/discussion_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function render(
$exportedposts = ($this->postprocessfortemplate) ($discussions, $user, $forum);
}

$baseurl = new \moodle_url($PAGE->url, array('o' => $sortorder));
$baseurl = new \moodle_url($PAGE->url, ['o' => $sortorder, 's' => $pagesize]);

$forumview = array_merge(
$forumview,
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$pageno = optional_param('page', 0, PARAM_INT);
$search = optional_param('search', '', PARAM_CLEAN);
$pageno = optional_param('p', $pageno, PARAM_INT);
$pagesize = optional_param('s', 0, PARAM_INT);
$pagesize = optional_param('s', $CFG->forum_manydiscussions ?? 0, PARAM_INT);
$sortorder = optional_param('o', null, PARAM_INT);

if (!$cmid && !$forumid) {
Expand Down

0 comments on commit dfde819

Please sign in to comment.