From 0094ac081515e528f3b1bdd05a41e15672a873cf Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 5 Dec 2015 11:20:16 -0500 Subject: [PATCH] CRM-17637 - Delete unused file --- CRM/Upgrade/Incremental/php/FourSeven.php | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index d9c9b411a2..478bab0778 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -124,6 +124,16 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base $this->addTask('Update Smart Groups', 'fixContactTypeInSmartGroups'); } + /** + * Upgrade function. + * + * @param string $rev + */ + public function upgrade_4_7_beta2($rev) { + $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev); + $this->addTask('Delete unused file', 'deleteVersionCheckCacheFile'); + } + /** * CRM-16354 * @@ -332,4 +342,20 @@ FROM `civicrm_dashboard_contact` WHERE 1 GROUP BY contact_id"; return TRUE; } + /** + * CRM-17637 - Ths file location has been moved; delete the old one + * + * @param \CRM_Queue_TaskContext $ctx + * + * @return bool + */ + public function deleteVersionCheckCacheFile(CRM_Queue_TaskContext $ctx) { + $config = CRM_Core_Config::singleton(); + $cacheFile = $config->uploadDir . 'version-info-cache.json'; + if (file_exists($cacheFile)) { + unlink($cacheFile); + } + return TRUE; + } + } -- 2.25.1