? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
26 May 2016

Pull Request for Issue #9881

Summary of Changes

Too much copy/pasting led to the wrong variable being used in the sendAdminMail() method. This fixes it.

Testing Instructions

Code review. See 7fcf7f6#diff-98e863dabf8033c2313bc92e9c99cc2fL615 to see how the variable changed and how this corrects it back.

avatar mbabker mbabker - open - 26 May 2016
avatar mbabker mbabker - change - 26 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 May 2016
Labels Added: ?
avatar wojsmol wojsmol - test_item - 26 May 2016 - Tested successfully
avatar wojsmol
wojsmol - comment - 26 May 2016

I have tested this item successfully on 37b2f4f


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10633.

avatar andrepereiradasilva andrepereiradasilva - test_item - 26 May 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 26 May 2016

I have tested this item successfully on 37b2f4f

on code review


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10633.

avatar sovainfo
sovainfo - comment - 26 May 2016

Why not make it work like anybody would expect: respect the third parameter $email and use it to send the email to. It is not much use to send it to the site admin!

EDIT: My bad, the second parameter is the recipient email which makes $email obsolete. The naming is very confusing, it can be anybody's email. The calling program determines that. It doesn't have to be the site administrator or an administrator at all. The calling program can invent the name and email as they want.

avatar mbabker
mbabker - comment - 26 May 2016

I've never used the method so I don't know what the expectation is honestly. For now this PR just fixes the behavior I broke by using a bad variable. Though by the method name just at a guess I'd say sendAdminMail() should be sending an admin an email, but why that needs a dedicated method that you still have to pass an email address to (with no validation it's actually an admin receiving the message) seems odd to say the least.

avatar infograf768
infograf768 - comment - 26 May 2016

this was created (see doc bloc) specifically imho to send mail to admin when a user has submitted new item in frontend. that's why i think it is never used... and we have no lang strings

avatar sovainfo
sovainfo - comment - 26 May 2016

That explains why it is not used in the content plugin. There they implemented it for all that are to receive mails (sendEmail = 1).

avatar Kubik-Rubik Kubik-Rubik - change - 26 May 2016
Milestone Added:
avatar Kubik-Rubik Kubik-Rubik - change - 26 May 2016
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - change - 26 May 2016
Milestone Removed:
avatar Kubik-Rubik Kubik-Rubik - change - 26 May 2016
Milestone Added:
avatar Kubik-Rubik Kubik-Rubik - change - 26 May 2016
Milestone Added:
avatar Kubik-Rubik
Kubik-Rubik - comment - 26 May 2016

Thank you @mbabker!

avatar joomla-cms-bot joomla-cms-bot - change - 26 May 2016
Labels Added: ?
avatar Kubik-Rubik Kubik-Rubik - close - 26 May 2016
avatar Kubik-Rubik Kubik-Rubik - merge - 26 May 2016
avatar joomla-cms-bot joomla-cms-bot - close - 26 May 2016
avatar Kubik-Rubik Kubik-Rubik - reference | e4cdf02 - 26 May 16
avatar Kubik-Rubik Kubik-Rubik - merge - 26 May 2016
avatar Kubik-Rubik Kubik-Rubik - close - 26 May 2016
avatar Kubik-Rubik Kubik-Rubik - change - 26 May 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-26 16:01:31
Closed_By Kubik-Rubik
avatar joomla-cms-bot joomla-cms-bot - change - 26 May 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment