joomla/joomla-cms — pull request #4127 by bembelimen (2014-08-18 11:17:22+00:00)
Title: Fixed wrong order of "UNION" and "ORDER BY"

If you use UNION with ORDER BY, UNION is needed first and after that ORDER BY to sort the result.