• Richard Mansfield's avatar
    Cache user records in calls to display_default_name · bb91e704
    Richard Mansfield authored
    Commit 0cdaaa1d
     introduced a lot of calls to display_default_name.
    Unfortunately this bypasses the user record caching that happens
    inside display_name, so it produced a lot of new queries, most notably
    on profile pages, where a single user's name gets displayed several
    This change moves the caching of user records into another function,
    so it can be shared by display_name, display_default_name, and
    The search_user function is also modified to fetch the admin status
    and profileicon id, to stop profile_icon_url producing more queries.
    Change-Id: Id1993decf164e7d0563a7d277444402fc6350b3a
    Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
lib.php 47.5 KB