Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
2516dc30
Commit
2516dc30
authored
Apr 15, 2014
by
webchick
Browse files
Issue
#2239369
by sun: "Comments per page" setting cannot be configured to be larger than 300.
parent
0a85def4
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/comment/comment.module
View file @
2516dc30
...
...
@@ -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().
*/
...
...
core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php
View file @
2516dc30
...
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment