User tests: Successful: Unsuccessful:
Addresses tracker issue #30181
Looks ok, however, the lines above the $db stuff ($user and the addIncludePath's) can move down to under this if, so that they do not get executed if the if returns true.
Also the inline setQuery('SELECT id FROM #__users WHERE sendEmail = 1')
should be converted to a query object.
$query->select($db->quoteName('id'))
->from('#__users')
->where($db->quoteName('sendEmail') . ' = 1');
$db->setQuery($query);
Or (not having to use quoteName):
$query->select('u.id')
->from('#__users as u')
->where('u.sendEmail = 1');
$db->setQuery($query);
@davidhurley Did you want to leave this as is or update the way @nonumber suggested?
I'll update as suggested for performance.
Thanks,
David Hurley
On Oct 6, 2013 9:04 PM, "elinw" notifications@github.com wrote:
@davidhurley https://github.com/davidhurley Did you want to leave this
as is or update the way @nonumber https://github.com/nonumber suggested?—
Reply to this email directly or view it on GitHub#764 (comment)
.
When? ;-)
Thanks for coding this, David!
For anyone interested, here's the direct link to the tracker item on JoomlaCode:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30181