Fix master regression on inactive contact types
authoreileen <emcnaughton@wikimedia.org>
Sat, 20 Jun 2020 00:45:16 +0000 (12:45 +1200)
committereileen <emcnaughton@wikimedia.org>
Sat, 20 Jun 2020 08:59:21 +0000 (20:59 +1200)
commiteb8dbd47ba5af22d839cc6663db46f78a997f95b
tree6c468e753a36714ccaf8711ace3d9bb1725fd1da
parent88bc0c6d4d2dc60cf59d3383280614b1ea69f964
Fix master regression on inactive contact types

Removing the WHERE type.name = NULL here makes sense

https://github.com/civicrm/civicrm-core/commit/351e8d470a95e1a610280731706c816033fb79fa#diff-ae3cfb8afd3fe1ab8f471b3a069563cdL244

but a few lines later an extra condition is added - we need the WHERE there to prevent it being
added to the join clause.

Note that I did something a bit yuck with the static. I want to properly re-write the function
with consistent caching but after it's under testing, hence a quick fix
CRM/Contact/BAO/ContactType.php
tests/phpunit/CRM/Contact/BAO/ContactType/ContactTypeTest.php