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
b9d3b47e
Commit
b9d3b47e
authored
Apr 13, 2006
by
Gerhard Killesreiter
Browse files
#55096
, don't show online users in block if nobody online, patch by tenrapid
parent
61b9b358
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/user.module
View file @
b9d3b47e
...
...
@@ -601,13 +601,15 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
// Display a list of currently online users.
$max_users
=
variable_get
(
'user_block_max_list_count'
,
10
);
$items
=
array
();
if
(
$total_users
&&
$max_users
)
{
$items
=
array
();
while
(
$max_users
--
&&
$account
=
db_fetch_object
(
$users
))
{
$items
[]
=
$account
;
}
while
(
$max_users
--
&&
$account
=
db_fetch_object
(
$users
))
{
$items
[]
=
$account
;
}
$output
.
=
theme
(
'user_list'
,
$items
,
t
(
'Online users'
));
$output
.
=
theme
(
'user_list'
,
$items
,
t
(
'Online users'
));
}
$block
[
'subject'
]
=
t
(
'Who\'s online'
);
$block
[
'content'
]
=
$output
;
...
...
modules/user/user.module
View file @
b9d3b47e
...
...
@@ -601,13 +601,15 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
// Display a list of currently online users.
$max_users
=
variable_get
(
'user_block_max_list_count'
,
10
);
$items
=
array
();
if
(
$total_users
&&
$max_users
)
{
$items
=
array
();
while
(
$max_users
--
&&
$account
=
db_fetch_object
(
$users
))
{
$items
[]
=
$account
;
}
while
(
$max_users
--
&&
$account
=
db_fetch_object
(
$users
))
{
$items
[]
=
$account
;
}
$output
.
=
theme
(
'user_list'
,
$items
,
t
(
'Online users'
));
$output
.
=
theme
(
'user_list'
,
$items
,
t
(
'Online users'
));
}
$block
[
'subject'
]
=
t
(
'Who\'s online'
);
$block
[
'content'
]
=
$output
;
...
...
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