X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FVersionCheck.php;h=2c8cbd9cc4c46613f8a37e31d32cc913df09365e;hb=ee128a6c5aeede94936e6db227d178af3d712ead;hp=23d13e0ba7f3f25c0becafc85dca0435a2467095;hpb=e98d91afdb1458e2de5f6c37310788f4820bb288;p=civicrm-core.git diff --git a/CRM/Utils/VersionCheck.php b/CRM/Utils/VersionCheck.php index 23d13e0ba7..2c8cbd9cc4 100644 --- a/CRM/Utils/VersionCheck.php +++ b/CRM/Utils/VersionCheck.php @@ -179,11 +179,10 @@ class CRM_Utils_VersionCheck { $dao->find(); $ppTypes = array(); - // Get title and id for all processor types - $ppTypeNames = CRM_Core_PseudoConstant::paymentProcessorType(); - + // Get title for all processor types + // FIXME: This should probably be getName, but it has always returned translated label so we stick with that for now as it would affect stats while ($dao->fetch()) { - $ppTypes[] = $ppTypeNames[$dao->payment_processor_type_id]; + $ppTypes[] = CRM_Core_PseudoConstant::getLabel('CRM_Financial_BAO_PaymentProcessor', 'payment_processor_type_id', $dao->payment_processor_type_id); } // add the .-separated list of the processor types $this->stats['PPTypes'] = implode(',', array_unique($ppTypes)); @@ -336,6 +335,15 @@ class CRM_Utils_VersionCheck { } } + /** + * Removes cached version info. + */ + public function flushCache() { + if (file_exists($this->cacheFile)) { + unlink($this->cacheFile); + } + } + /** * Lookup version_check scheduled job */