Fix & test searchQuery order by to be less dependent on what is selected for search
authoreileen <emcnaughton@wikimedia.org>
Fri, 22 Feb 2019 20:49:12 +0000 (09:49 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 25 Feb 2019 06:43:42 +0000 (19:43 +1300)
commita0090e6bf5bd0d91e22642d0a36f124d6f1877ea
tree352a7336dec982088aa2b3f886293df365226b7b
parent58ef76b3426ce36804343bcca877e860bf70879d
Fix & test searchQuery order by to be less dependent on what is selected for search

The pseudoconstant array is built when doing a select - if a field is in
order by but not select it will fail - as in the test.

This is a bit hard to hit outside the test for contribution but makes it more robust`
allowing us to address other bugs & performance issues.
CRM/Contact/BAO/Query.php
CRM/Contribute/BAO/Query.php
CRM/Core/DAO.php
tests/phpunit/CRM/Contribute/BAO/QueryTest.php [new file with mode: 0644]
tests/phpunit/CRM/Export/BAO/ExportTest.php