return $config->imageUploadDir && $config->imageUploadURL && $check->isDirAccessible($config->imageUploadDir, $config->imageUploadURL);
}
+ /**
+ * CRM-20572 - Format date fields in Contrib Sybunt custom search's saved criteria.
+ *
+ * @param \CRM_Queue_TaskContext $ctx
+ *
+ * @return bool
+ */
+ public static function fixDateFieldsInSmartGroups(CRM_Queue_TaskContext $ctx) {
+ $dao = CRM_Core_DAO::executeQuery("SELECT id, form_values FROM civicrm_saved_search WHERE form_values LIKE '%CRM_Contact_Form_Search_Custom_ContribSYBNT%'");
+ while ($dao->fetch()) {
+ $formValues = unserialize($dao->form_values);
+ CRM_Contact_Form_Search_Custom_ContribSYBNT::formatSavedSearchFields($formValues);
+ CRM_Core_DAO::executeQuery("UPDATE civicrm_saved_search SET form_values = %1 WHERE id = {$dao->id}", array(1 => array(serialize($formValues), 'String')));
+ }
++ return TRUE;
++ }
+
+ /**
+ * CRM-20892 Convert default of created_date in civicrm_mailing table to NULL
+ * @return bool
+ */
+ public static function civiMailingCreatedDateNull(CRM_Queue_TaskContext $ctx) {
+ $dataType = 'timestamp';
+ if (CRM_Utils_Check_Component_Timestamps::isFieldType('civicrm_mailing', 'created_date', 'datetime')) {
+ $dataType = 'datetime';
+ }
+ CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_mailing CHANGE created_date created_date {$dataType} NULL DEFAULT NULL COMMENT 'Date and time this mailing was created.'");
return TRUE;
}