Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
45f4bcaa
Commit
45f4bcaa
authored
Sep 27, 2005
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#26031
by leafish_dylan: fixed comment pager (broken SQL query).
parent
dff2df48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
modules/comment.module
modules/comment.module
+1
-1
modules/comment/comment.module
modules/comment/comment.module
+1
-1
No files found.
modules/comment.module
View file @
45f4bcaa
...
...
@@ -906,7 +906,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
status
= %d AND
nid
= %d"
,
$nid
,
COMMENT_PUBLISHED
);
$result
=
pager_query
(
$query
,
$comments_per_page
,
0
,
"SELECT COUNT(*) FROM
{
comments
}
WHERE
nid
= %d AND
status
= %d"
,
$nid
,
COMMENT_PUBLISHED
);
if
(
db_num_rows
(
$result
)
&&
(
variable_get
(
'comment_controls'
,
3
)
==
0
||
variable_get
(
'comment_controls'
,
3
)
==
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 @
45f4bcaa
...
...
@@ -906,7 +906,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
status
= %d AND
nid
= %d"
,
$nid
,
COMMENT_PUBLISHED
);
$result
=
pager_query
(
$query
,
$comments_per_page
,
0
,
"SELECT COUNT(*) FROM
{
comments
}
WHERE
nid
= %d AND
status
= %d"
,
$nid
,
COMMENT_PUBLISHED
);
if
(
db_num_rows
(
$result
)
&&
(
variable_get
(
'comment_controls'
,
3
)
==
0
||
variable_get
(
'comment_controls'
,
3
)
==
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