Closed (fixed)
Project:
Ubercart
Version:
6.x-2.0-beta5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
27 Mar 2009 at 15:22 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cha0s commentedI'm thinking this may be how this code is supposed to look.
Comment #2
rszrama commentedPatch looks good to me... any thoughts on the other instances of language_default() in core? I see it in files, roles, and order admin.
Comment #3
cha0s commentedI audited all the uses of that function... In the process, I've come up with what I think is a more robust solution. This adds a new function, uc_store_mail_recipient_language($address) which takes an e-mail address, and returns the language object associated with any user with that email (defaulting to site default language). Then for each e-mail Ubercart's sending out, we're running through that function.
See, if an order was placed by user 1, but user 3 was in the list of recipients, user 3 would get user 1's language. Now he'll get user 3's language.
Comment #4
Docc commentedFunction sounds good to me. Ill test this patch when i get the change.
Comment #5
rszrama commentedInitially looks good to me, though I might change "mail" to "email" in the func name a la uc_store_email_from(). Don't worry about that yourself... bookmarking this for review and can tweak it myself if I think it's that important. : P
Comment #6
cha0s commentedWould you like me to roll a new patch?
Comment #7
rszrama commentedComment #8
Island Usurper commentedIt works, and it looks like it's already been changed to uc_store_email_from(), so I'm going to go ahead an commit it.
Rerolled the patch to add documentation to the function uc_store_mail_recipient_language().