Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send_pm () should consider users language. #834

Closed
Sama34 opened this issue Jul 1, 2014 · 11 comments
Closed

send_pm () should consider users language. #834

Sama34 opened this issue Jul 1, 2014 · 11 comments
Assignees
Milestone

Comments

@Sama34
Copy link
Contributor

@Sama34 Sama34 commented Jul 1, 2014

The send_pm () function should consider the language of the user to whom the PM is being sent.

@mybb/developers

  • managegroup.php
  • usercp.php
  • inc/class_custommoderation.php
  • inc/datahandlers/post.php

Reference: #757 (comment)

@Sama34 Sama34 self-assigned this Jul 1, 2014
@Sama34 Sama34 added this to the 1.8 Beta 3 milestone Jul 1, 2014
@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented Jul 1, 2014

Definitely. #757 would have its temporary fix removed then.

@Sama34
Copy link
Contributor Author

@Sama34 Sama34 commented Jul 8, 2014

Please review 191f5ee . Seems like the best approach but seems dirty.

@mybb/developers

@JordanMussi
Copy link
Member

@JordanMussi JordanMussi commented Jul 9, 2014

That seems fine at first glance.

@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented Jul 14, 2014

Right now this shouldn't work at all. You added a new option called 'language' but it's never used. There should be no parameter language, it should simply load the language of the end user. Then switch back to the original.

@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented Jul 16, 2014

@Sama34 (feel free to correct me)

@Sama34
Copy link
Contributor Author

@Sama34 Sama34 commented Jul 17, 2014

language is the language of the user to whom the PM is being sent. It is passed within the $pm array in the send_pm() function. So I think it does what you suggest it should be doing.

It did work for me.

EDIT: It only works for managegroup.php, usercp.php wasn't fully edited..

@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented Jul 17, 2014

Yes that's what I meant. The language property was never implemented in some places where send_pm was used.

@Sama34
Copy link
Contributor Author

@Sama34 Sama34 commented Jul 19, 2014

This should now be finished.

@PirataNervo, for inc/datahandlers/post.php there is a wicked code there that loads a new language handler when sending an e-mail notification (I updated the code when it is a PM one to use this issue's method).

I think that should be updated as well, adding a function to build the e-mail and store it in the DB. That should be marked as a bug since it is there since 1.6. What do you think?

@mybb/developers

@Sama34 Sama34 added the fixed label Jul 19, 2014
@Sama34
Copy link
Contributor Author

@Sama34 Sama34 commented Jul 19, 2014

inc/class_custommoderation.php doesn't use language strings so unless we add that feature on the future it doesn't needs updating.

@Sama34 Sama34 removed the feedback label Jul 20, 2014
@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented Jul 20, 2014

Sounds good to me, this just needs testing then.

@Sama34
Copy link
Contributor Author

@Sama34 Sama34 commented Jul 20, 2014

Ok for the sake of get beta 3 done with, I'm going to close this.

It worked for me so please consider opening a new issue/thread if you find bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants