$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
*
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;
+ }
+
}