|
[F] Notifications in wrong language
|
|
08-06-2008, 01:43 PM
Post: #1
|
|||
|
|||
|
[F] Notifications in wrong language
myBB version: 1.4(1400)
When receiving notifications on new posts, the emails contains the wrong language. To explain, we are 2 administrators, the other one has set his language to dutch, mine is english standard. The boards default language is set to english. But the received mail is in dutch. PHP mail is used, no other parameters. Is this a bug? |
|||
|
08-07-2008, 02:31 AM
Post: #2
|
|||
|
|||
|
RE: Notifications in wrong language
Can anyone confirm this?
![]() My Blog - My Mods |
|||
|
08-07-2008, 11:38 AM
Post: #3
|
|||
|
|||
|
RE: Notifications in wrong language
The code and db confirm this.
If a user doesn't select a language when s/he registers, but leaves the dropdown at 'Default language', no language is set in the db (empty field). This means the if-statement in lines 870-881 of inc/datahandlers/post.php will fall back to $mybb->settings['bblanguage'], which is the language of the user creating the post. Rob forum.kde.org Communicate.
|
|||
|
08-07-2008, 03:03 PM
Post: #4
|
|||
|
|||
RE: Notifications in wrong language
(08-07-2008 11:38 AM)OhReally Wrote: If a user doesn't select a language when s/he registers, but leaves the dropdown at 'Default language', no language is set in the db (empty field). This means the if-statement in lines 870-881 of inc/datahandlers/post.php will fall back to $mybb->settings['bblanguage'], which is the language of the user creating the post. PHP Code: // Fetch any users subscribed to this thread receiving instant notification and queue up their subscription noticesIt loops through each individual user and checks their language, not just the language of the user creating the post. I don't see what's wrong yet ![]() My Blog - My Mods |
|||
|
08-07-2008, 03:18 PM
Post: #5
|
|||
|
|||
|
RE: Notifications in wrong language
If a user registers, but does not change the language settings, the 'language' field in th user record in the db will have a value of '' (empty string).
Pseudo code of the code in inc/datahandlers/post.php: Code: if ((subscribedmember's language is not the empty string) and (the language file exists)) {forum.kde.org Communicate.
|
|||
|
08-07-2008, 03:21 PM
Post: #6
|
|||
|
|||
|
RE: Notifications in wrong language
Like I said, there's nothing wrong with that. It loops through each subscribed user and sends to their OWN language. The variable is refreshed every loop.
![]() My Blog - My Mods |
|||
|
08-07-2008, 03:23 PM
(This post was last modified: 08-07-2008 03:24 PM by OhReally.)
Post: #7
|
|||
|
|||
|
RE: Notifications in wrong language
But if the subscribed member has not set a language, the poster's language is used...
forum.kde.org Communicate.
|
|||
|
08-07-2008, 03:25 PM
Post: #8
|
|||
|
|||
|
RE: Notifications in wrong language
No it doesn't. It uses the board's default language. Which would be english
PHP Code: elseif($mybb->settings['bblanguage'])![]() My Blog - My Mods |
|||
|
08-07-2008, 03:45 PM
Post: #9
|
|||
|
|||
|
RE: Notifications in wrong language
Okay, I may be wrong here, but to me it looks like $mybb->settings['bblanguage'] is set to $mybb->input['language'] in global.php.
forum.kde.org Communicate.
|
|||
|
08-07-2008, 05:10 PM
Post: #10
|
|||
|
|||
RE: Notifications in wrong language
(08-07-2008 03:45 PM)OhReally Wrote: Okay, I may be wrong here, but to me it looks like $mybb->settings['bblanguage'] is set to $mybb->input['language'] in global.php. That's for the "quick language select" feature; the more relevant code is in /inc/class_session.php... PHP Code: if($mybb->user['language'] && $lang->language_exists($mybb->user['language']))So to reiterate, $mybb->settings['bblanguage'] is not necessarily the board's default language. |
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help



![[Image: ryangordon.png]](http://files.bellomandesign.com/signatures/mybb/ryangordon.png)
