fixed: in notify/notify.cpp: a correct locale id should be taken

(we were not able to send: a mail with an activation link and 
        a mail with the reset password link when we didn't have a locale with id 0 loaded)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@929 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2013-05-16 21:02:17 +00:00
parent 9ffda3e070
commit 083fa7857f
4 changed files with 8 additions and 7 deletions

View File

@@ -110,7 +110,7 @@ void Notify::ActivateAccount(const std::wstring & name, const std::wstring & ema
msg.code = WINIX_NOTIFY_CODE_CONFIRM_ACCOUNT;
msg.name = name;
msg.email = email;
msg.lang = 0; // !! IMPROVE ME a better language can be chose
msg.lang = config->locale_default_id;
msg.activate_code = code;
msg.template_index = notify_template_activate_account;
CreateActivateLink(name, code, msg.item_link);
@@ -126,7 +126,7 @@ void Notify::ResetPassword(const std::wstring & name, const std::wstring & email
msg.code = WINIX_NOTIFY_CODE_RESET_PASSWORD;
msg.name = name;
msg.email = email;
msg.lang = 0; // !! IMPROVE ME a better language can be chose
msg.lang = config->locale_default_id; // !! IMPROVE ME a better language can be chose (the same as the user has)
msg.activate_code = code;
msg.template_index = notify_template_reset_password;
CreateResetPasswordLink(name, code, msg.item_link);