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
818de3a6
Commit
818de3a6
authored
Nov 15, 2010
by
webchick
Browse files
#963612
by chx, sun: Stop notices in templates if comment form doesn't exist.
parent
14d2f790
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/comment/comment.module
View file @
818de3a6
...
...
@@ -2334,6 +2334,8 @@ function template_preprocess_comment_wrapper(&$variables) {
// Provide contextual information.
$variables
[
'node'
]
=
$variables
[
'content'
][
'#node'
];
$variables
[
'display_mode'
]
=
variable_get
(
'comment_default_mode_'
.
$variables
[
'node'
]
->
type
,
COMMENT_MODE_THREADED
);
// The comment form is optional and may not exist.
$variables
[
'content'
]
+=
array
(
'comment_form'
=>
array
());
}
/**
...
...
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