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
beb7cfa8
Commit
beb7cfa8
authored
Nov 09, 2007
by
Dries
Browse files
- Patch
#190483
by webernet et al: tiny code cleanup.
parent
d0748035
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/comment/comment.module
View file @
beb7cfa8
...
...
@@ -957,7 +957,6 @@ function comment_render($node, $cid = 0) {
$result
=
pager_query
(
$query
,
$comments_per_page
,
0
,
$query_count
,
$query_args
);
$divs
=
0
;
$last_depth
=
0
;
$num_rows
=
FALSE
;
$comments
=
''
;
drupal_add_css
(
drupal_get_path
(
'module'
,
'comment'
)
.
'/comment.css'
);
...
...
@@ -967,16 +966,14 @@ function comment_render($node, $cid = 0) {
$comment
->
depth
=
count
(
explode
(
'.'
,
$comment
->
thread
))
-
1
;
if
(
$mode
==
COMMENT_MODE_THREADED_COLLAPSED
||
$mode
==
COMMENT_MODE_THREADED_EXPANDED
)
{
if
(
$comment
->
depth
>
$
last_depth
)
{
if
(
$comment
->
depth
>
$
divs
)
{
$divs
++
;
$comments
.
=
'<div class="indented">'
;
$last_depth
++
;
}
else
{
while
(
$comment
->
depth
<
$
last_depth
)
{
while
(
$comment
->
depth
<
$
divs
)
{
$divs
--
;
$comments
.
=
'</div>'
;
$last_depth
--
;
}
}
}
...
...
@@ -996,16 +993,16 @@ function comment_render($node, $cid = 0) {
$num_rows
=
TRUE
;
}
while
(
$divs
--
>
0
)
{
$comments
.
=
'</div>'
;
}
$comment_controls
=
variable_get
(
'comment_controls_'
.
$node
->
type
,
COMMENT_CONTROLS_HIDDEN
);
if
(
$num_rows
&&
(
$comment_controls
==
COMMENT_CONTROLS_ABOVE
||
$comment_controls
==
COMMENT_CONTROLS_ABOVE_BELOW
))
{
$output
.
=
drupal_get_form
(
'comment_controls'
,
$mode
,
$order
,
$comments_per_page
);
}
$output
.
=
$comments
;
for
(
$i
=
0
;
$i
<
$divs
;
$i
++
)
{
$output
.
=
'</div>'
;
}
$output
.
=
$comments
;
$output
.
=
theme
(
'pager'
,
NULL
,
$comments_per_page
,
0
);
if
(
$num_rows
&&
(
$comment_controls
==
COMMENT_CONTROLS_BELOW
||
$comment_controls
==
COMMENT_CONTROLS_ABOVE_BELOW
))
{
...
...
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