Commit 2516dc30 authored by webchick's avatar webchick
Browse files

Issue #2239369 by sun: "Comments per page" setting cannot be configured to be larger than 300.

parent 0a85def4
......@@ -1452,14 +1452,6 @@ function template_preprocess_comment_wrapper(&$variables) {
$variables['form'] = $variables['content']['comment_form'];
}
/**
* Returns an array of "comments per page" values that users can select from.
*/
function _comment_per_page() {
$comments_per_page = array(10, 30, 50, 70, 90, 150, 200, 250, 300);
return array_combine($comments_per_page, $comments_per_page);
}
/**
* Implements hook_ranking().
*/
......
......@@ -126,10 +126,13 @@ public function instanceSettingsForm(array $form, array &$form_state) {
'#description' => t('Show comment replies in a threaded list.'),
);
$element['comment']['per_page'] = array(
'#type' => 'select',
'#type' => 'number',
'#title' => t('Comments per page'),
'#default_value' => $settings['per_page'],
'#options' => _comment_per_page(),
'#required' => TRUE,
'#min' => 10,
'#max' => 1000,
'#step' => 10,
);
$element['comment']['anonymous'] = array(
'#type' => 'select',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment