MyBB Community Forums

Full Version: Language problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I don't see anything against fixing that, but your code is far away from being a good solution (it breaks the possibility to rename folders).

Removing this useless code which causes the bug:
if(!$mybb->user['pmfolders'])
{
   $mybb->user['pmfolders'] = "1**".$lang->folder_inbox."$%%$2**".$lang->folder_sent_items."$%%$3**".$lang->folder_drafts."$%%$4**".$lang->folder_trash;
   $db->update_query("users", array('pmfolders' => $mybb->user['pmfolders']), "uid='".$mybb->user['uid']."'");
}
from usercp.php should do it, at least for new users (old ones will still have the pointless default values saved in the database and Idon't think cleaning them on upgrade is a good idea).
(2014-11-19, 03:47 PM)TBO29 Wrote: [ -> ]Well whatever, I modified how it works, and now it does what it should do. My users or readers  are speaking different languages and they can select their language with the language selector, so everything must be shown in the chosen language without that I as an admin have to run sql queries.

problem that need rewrite several thing. Default folder not possible more edit, if will use language file, only extra folder created per user.
(2014-11-19, 08:17 PM)martec Wrote: [ -> ]Default folder not possible more edit, if will use language file, only extra folder created per user.

Not true.

The function already checks if a custom name exists and if not then language strings are used. The problem is that the custom names exist for every user, even if they didn't edit it. Because of the query mentioned above.
(2014-11-19, 06:39 PM)Destroy666 Wrote: [ -> ]I don't see anything against fixing that, but your code is far away from being a good solution (it breaks the possibility to rename folders).

Removing this useless code which causes the bug:

if(!$mybb->user['pmfolders'])
{
   $mybb->user['pmfolders'] = "1**".$lang->folder_inbox."$%%$2**".$lang->folder_sent_items."$%%$3**".$lang->folder_drafts."$%%$4**".$lang->folder_trash;
   $db->update_query("users", array('pmfolders' => $mybb->user['pmfolders']), "uid='".$mybb->user['uid']."'");
}
from usercp.php should do it, at least for new users (old ones will still have the pointless default values saved in the database and Idon't think cleaning them on upgrade is a good idea).
Yes, I'm aware of this. However I never had any user who renamed or added a folder. So personally for my forum I eliminated the possibility to rename or edit folders. Just as I said, a question of convenience for me. The immediate function for an updated language selection is more important. Many users are coming from FB and wouldn't understand nor want to bother with such details.
Going to push this as it's a bug imho. If it works with Destroy's code I'm fine with it. Existing users shouldn't be changed as it's a pita.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2057

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Pages: 1 2