From: David Reedy Jr Date: Mon, 28 Dec 2015 23:50:39 +0000 (-0600) Subject: CRM-17686 disable flexible jobs extension... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fb1f38504ea186511cd3733153074f90c37723e0;p=civicrm-core.git CRM-17686 disable flexible jobs extension... ...when upgrading. --- 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; + } + }