Static cache in realname_make_name() broken in dev
voxpelli - July 14, 2009 - 12:52
| Project: | RealName |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
Seems like $users (and $links as reported in #449364: Latest dev removes homepage for registered users from [realname-link], instead it links to the profile) has been split between realname_make_name() and _realname_make_name().
This has resulted in that realname_make_name() only checks for a name in $users[$account->uid] but never actually assigns any value to it.
It's the opposite case in _realname_make_name() - it only assigns $users[$account->uid] - but never actually uses it.
The assigning of $users[$account->uid] should be moved from _realname_make_name() to realname_make_name() I think.

#1
Can it be a possible solution?
#2
I'd like to see some testers.
#3
Works for me :)
Really, it reduces query count significantly.
#4
There will be a new release on Wednesday; are you willing to bet that this can be included without breaking stuff?
The next tester can mark this RTBC.
#5
this patch no longer applies.
#6
This patch applies to the current dev version. It includes commenting out the line which addresses the static array $links which is defined in other function. I hope someone will have enough time to return the functionality of homepage calculation when the data is taken from the static cache. After that, this fix will be completed.