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
f27d1b7b
Commit
f27d1b7b
authored
May 01, 2004
by
Dries
Browse files
- Bug
#7135
: fixed saving of comment viewing options in PostgreSQL. Patch by Adrian.
parent
7332215a
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/comment.module
View file @
f27d1b7b
...
...
@@ -516,7 +516,6 @@ function comment_render($node, $cid = 0) {
if
(
empty
(
$order
))
{
$order
=
$user
->
sort
?
$user
->
sort
:
(
$_SESSION
[
"comment_sort"
]
?
$_SESSION
[
"comment_sort"
]
:
variable_get
(
"comment_default_order"
,
1
));
}
if
(
empty
(
$threshold
))
{
$threshold
=
$user
->
threshold
?
$user
->
threshold
:
(
$_SESSION
[
"comment_threshold"
]
?
$_SESSION
[
"comment_threshold"
]
:
variable_get
(
"comment_default_threshold"
,
0
));
}
...
...
@@ -1303,9 +1302,13 @@ function theme_comment_threshold($threshold) {
while
(
$filter
=
db_fetch_object
(
$result
))
{
$filters
.
=
" <option value=
\"
$filter->fid
\"
"
.
(
$threshold
==
$filter
->
fid
?
" selected=
\"
selected
\"
"
:
""
)
.
">"
.
t
(
$filter
->
filter
)
.
"</option>"
;
}
if
(
$filters
)
{
return
"<select name=
\"
threshold
\"
>
$filters
</select>
\n
"
;
}
else
{
return
"<input type=
\"
hidden
\"
name=
\"
threshold
\"
value=
\"
$threshold
\"
/>
\n
"
;
}
}
function
theme_comment_controls
(
$threshold
=
1
,
$mode
=
3
,
$order
=
1
,
$comments_per_page
=
50
)
{
...
...
modules/comment/comment.module
View file @
f27d1b7b
...
...
@@ -516,7 +516,6 @@ function comment_render($node, $cid = 0) {
if
(
empty
(
$order
))
{
$order
=
$user
->
sort
?
$user
->
sort
:
(
$_SESSION
[
"comment_sort"
]
?
$_SESSION
[
"comment_sort"
]
:
variable_get
(
"comment_default_order"
,
1
));
}
if
(
empty
(
$threshold
))
{
$threshold
=
$user
->
threshold
?
$user
->
threshold
:
(
$_SESSION
[
"comment_threshold"
]
?
$_SESSION
[
"comment_threshold"
]
:
variable_get
(
"comment_default_threshold"
,
0
));
}
...
...
@@ -1303,9 +1302,13 @@ function theme_comment_threshold($threshold) {
while
(
$filter
=
db_fetch_object
(
$result
))
{
$filters
.
=
" <option value=
\"
$filter->fid
\"
"
.
(
$threshold
==
$filter
->
fid
?
" selected=
\"
selected
\"
"
:
""
)
.
">"
.
t
(
$filter
->
filter
)
.
"</option>"
;
}
if
(
$filters
)
{
return
"<select name=
\"
threshold
\"
>
$filters
</select>
\n
"
;
}
else
{
return
"<input type=
\"
hidden
\"
name=
\"
threshold
\"
value=
\"
$threshold
\"
/>
\n
"
;
}
}
function
theme_comment_controls
(
$threshold
=
1
,
$mode
=
3
,
$order
=
1
,
$comments_per_page
=
50
)
{
...
...
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