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

maximpodorov - October 2, 2009 - 08:56

Can it be a possible solution?

AttachmentSize
realname.patch 2.04 KB

#2

NancyDru - October 8, 2009 - 20:59
Status:active» needs review

I'd like to see some testers.

#3

maximpodorov - October 9, 2009 - 08:13

Works for me :)
Really, it reduces query count significantly.

#4

NancyDru - October 9, 2009 - 13:41

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

noahb - October 14, 2009 - 23:14
Status:needs review» needs work

this patch no longer applies.

#6

maximpodorov - October 19, 2009 - 06:58

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.

AttachmentSize
realname.patch 2.17 KB
 
 

Drupal is a registered trademark of Dries Buytaert.