ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on September 08, 2013, 07:20:58 am

Title: loadCustomFields
Post by: emanuele on September 08, 2013, 07:20:58 am
At the moment we have two functions with the same name that do something similar, but not exactly the same.

loadCustomFields in Themes.subs.php (https://github.com/elkarte/Elkarte/blob/8e04c01d7121fcef704a45507282487ed8714ccc/sources/subs/Themes.subs.php#L539) (that I changed a bit in one of my commits (https://github.com/emanuele45/Dialogo/blob/1716e2bed2a527ae845ed218d35cb03b1b0846f7/sources/subs/Themes.subs.php#L543))
loadCustomFields in Profile.subs.php (https://github.com/elkarte/Elkarte/blob/8e04c01d7121fcef704a45507282487ed8714ccc/sources/subs/Profile.subs.php#L156)

I'm tempted to say that we should try to unify the two or make their names different. What do you think?
Title: Re: loadCustomFields
Post by: Spuds on September 08, 2013, 07:37:40 am
Sure seems like we could at least combine the db calls in to a single function ... then rename what remains like loadCustomFields in Profile.subs.php goes to setupCustomFieldContext or whatever (I'm not good with function names :P )
Title: Re: loadCustomFields
Post by: emanuele on September 08, 2013, 07:39:22 am
 /me neither... :P