mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[feature/events] Adding ledge viewtopic_user_cache
Used by phpBB Gallery PHPBB3-9550
This commit is contained in:
parent
2581b0e1e3
commit
713f8e4782
@ -1124,7 +1124,7 @@ while ($row = $db->sql_fetchrow($result))
|
||||
|
||||
$id_cache[] = $poster_id;
|
||||
|
||||
$user_cache[$poster_id] = array(
|
||||
$user_cache_data = array(
|
||||
'joined' => $user->format_date($row['user_regdate']),
|
||||
'posts' => $row['user_posts'],
|
||||
'warnings' => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
|
||||
@ -1162,6 +1162,13 @@ while ($row = $db->sql_fetchrow($result))
|
||||
'author_profile' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour']),
|
||||
);
|
||||
|
||||
$vars = array('user_cache_data', 'row', 'poster_id');
|
||||
$event = new phpbb_event_data(compact($vars));
|
||||
$phpbb_dispatcher->dispatch('core.viewtopic_user_cache', $event);
|
||||
extract($event->get_data_filtered($vars));
|
||||
|
||||
$user_cache[$poster_id] = $user_cache_data;
|
||||
|
||||
get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
|
||||
|
||||
if ((!empty($row['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_email'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user