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
f3b28d37
Commit
f3b28d37
authored
Aug 10, 2005
by
Dries
Browse files
- Patch
#27947
by Robert Douglas: simplified code, removed SQL query.
parent
9dec4430
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/profile.module
View file @
f3b28d37
...
...
@@ -53,8 +53,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
else
if
(
$op
==
'view'
)
{
if
(
user_access
(
'access user profiles'
))
{
if
((
arg
(
0
)
==
'node'
)
&&
is_numeric
(
arg
(
1
))
&&
(
arg
(
2
)
==
NULL
))
{
$result
=
db_query
(
'SELECT uid FROM {node} WHERE nid = %d ORDER BY uid DESC'
,
arg
(
1
));
$node
=
db_fetch_object
(
$result
);
$node
=
node_load
(
arg
(
1
));
$account
=
user_load
(
array
(
'uid'
=>
$node
->
uid
));
if
(
$use_fields
=
variable_get
(
'profile_block_author_fields'
,
array
()))
{
...
...
modules/profile/profile.module
View file @
f3b28d37
...
...
@@ -53,8 +53,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
else
if
(
$op
==
'view'
)
{
if
(
user_access
(
'access user profiles'
))
{
if
((
arg
(
0
)
==
'node'
)
&&
is_numeric
(
arg
(
1
))
&&
(
arg
(
2
)
==
NULL
))
{
$result
=
db_query
(
'SELECT uid FROM {node} WHERE nid = %d ORDER BY uid DESC'
,
arg
(
1
));
$node
=
db_fetch_object
(
$result
);
$node
=
node_load
(
arg
(
1
));
$account
=
user_load
(
array
(
'uid'
=>
$node
->
uid
));
if
(
$use_fields
=
variable_get
(
'profile_block_author_fields'
,
array
()))
{
...
...
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