From fb1f38504ea186511cd3733153074f90c37723e0 Mon Sep 17 00:00:00 2001 From: David Reedy Jr Date: Mon, 28 Dec 2015 17:50:39 -0600 Subject: [PATCH] CRM-17686 disable flexible jobs extension... ...when upgrading. --- CRM/Upgrade/Incremental/php/FourSeven.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index b11c80fc57..2fd013a061 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -134,6 +134,15 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base $this->addTask('Delete unused file', 'deleteVersionCheckCacheFile'); } + /** + * Upgrade function. + * + * @param string $rev + */ + public function upgrade_4_7_beta5($rev) { + $this->addTask('Disable flexible jobs extension', 'disableFlexibleJobsExtension'); + } + /** * CRM-16354 * @@ -363,4 +372,17 @@ FROM `civicrm_dashboard_contact` WHERE 1 GROUP BY contact_id"; return TRUE; } + /** + * CRM-17669 and CRM-17686, make scheduled jobs more flexible, disable the 4.6 extension if installed + * + * @param \CRM_Queue_TaskContext $ctx + * + * @return bool + */ + public function disableFlexibleJobsExtension(CRM_Queue_TaskContext $ctx) { + CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Job', 'Flexible Jobs', 'is_active', 0, 'name'); + + return TRUE; + } + } -- 2.25.1