mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +00:00
[ticket/13229] Fix overloading memberlist with redundant SQL queries
PHPBB3-13229
This commit is contained in:
parent
aa916fc43f
commit
16d78407db
2 changed files with 3 additions and 3 deletions
|
@ -1491,7 +1491,7 @@ function phpbb_get_user_rank($user_data, $user_posts)
|
||||||
/**
|
/**
|
||||||
* Prepare profile data
|
* Prepare profile data
|
||||||
*/
|
*/
|
||||||
function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
|
function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false, $check_can_receive_pm = true)
|
||||||
{
|
{
|
||||||
global $config, $auth, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher;
|
global $config, $auth, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher;
|
||||||
|
|
||||||
|
@ -1559,7 +1559,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
||||||
}
|
}
|
||||||
|
|
||||||
// Can this user receive a Private Message?
|
// Can this user receive a Private Message?
|
||||||
$can_receive_pm = (
|
$can_receive_pm = $check_can_receive_pm && (
|
||||||
// They must be a "normal" user
|
// They must be a "normal" user
|
||||||
$data['user_type'] != USER_IGNORE &&
|
$data['user_type'] != USER_IGNORE &&
|
||||||
|
|
||||||
|
|
|
@ -1427,7 +1427,7 @@ switch ($mode)
|
||||||
$cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array();
|
$cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$memberrow = array_merge(phpbb_show_profile($row), array(
|
$memberrow = array_merge(phpbb_show_profile($row, false, false, false), array(
|
||||||
'ROW_NUMBER' => $i + ($start + 1),
|
'ROW_NUMBER' => $i + ($start + 1),
|
||||||
|
|
||||||
'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
|
'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue