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
bf123682
Commit
bf123682
authored
Jan 12, 2005
by
Steven Wittens
Browse files
- Fix comment pager counting unpublished comments.
parent
bf09864c
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/comment.module
View file @
bf123682
...
...
@@ -846,7 +846,7 @@ function comment_render($node, $cid = 0) {
}
// Start a form, for use with comment control and moderation.
$result
=
pager_query
(
$query
,
$comments_per_page
,
0
,
"SELECT COUNT(*) FROM
{
comments
}
WHERE nid = '"
.
db_escape_string
(
$nid
)
.
"'"
);
$result
=
pager_query
(
$query
,
$comments_per_page
,
0
,
"SELECT COUNT(*) FROM
{
comments
}
WHERE
c.status = 0 AND
nid = '"
.
db_escape_string
(
$nid
)
.
"'"
);
if
(
db_num_rows
(
$result
)
&&
(
variable_get
(
'comment_controls'
,
0
)
==
0
||
variable_get
(
'comment_controls'
,
0
)
==
2
))
{
$output
.
=
'<form method="post" action="'
.
url
(
'comment'
)
.
"
\"
><div>
\n
"
;
$output
.
=
theme
(
'comment_controls'
,
$threshold
,
$mode
,
$order
,
$comments_per_page
);
...
...
modules/comment/comment.module
View file @
bf123682
...
...
@@ -846,7 +846,7 @@ function comment_render($node, $cid = 0) {
}
// Start a form, for use with comment control and moderation.
$result
=
pager_query
(
$query
,
$comments_per_page
,
0
,
"SELECT COUNT(*) FROM
{
comments
}
WHERE nid = '"
.
db_escape_string
(
$nid
)
.
"'"
);
$result
=
pager_query
(
$query
,
$comments_per_page
,
0
,
"SELECT COUNT(*) FROM
{
comments
}
WHERE
c.status = 0 AND
nid = '"
.
db_escape_string
(
$nid
)
.
"'"
);
if
(
db_num_rows
(
$result
)
&&
(
variable_get
(
'comment_controls'
,
0
)
==
0
||
variable_get
(
'comment_controls'
,
0
)
==
2
))
{
$output
.
=
'<form method="post" action="'
.
url
(
'comment'
)
.
"
\"
><div>
\n
"
;
$output
.
=
theme
(
'comment_controls'
,
$threshold
,
$mode
,
$order
,
$comments_per_page
);
...
...
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