*/
public static function addDataTypeColumnToOptionGroupTable() {
if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists('civicrm_option_group', 'data_type')) {
- CRM_Core_DAO::executeQuery("ALTER TABLE `civicrm_option_group` ADD COLUMN `data_type` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL comment 'Data Type of Option Group.'");
+ CRM_Core_DAO::executeQuery("ALTER TABLE `civicrm_option_group` ADD COLUMN `data_type` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL comment 'Data Type of Option Group.'",
+ array(), TRUE, NULL, FALSE, FALSE);
+ }
+ $domain = new CRM_Core_DAO_Domain();
+ $domain->find(TRUE);
+ if ($domain->locales) {
+ $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
+ CRM_Core_I18n_Schema::rebuildMultilingualSchema($locales, NULL);
}
+
CRM_Core_DAO::executeQuery("UPDATE `civicrm_option_group` SET `data_type` = 'Integer'
WHERE name IN ('activity_type', 'gender', 'payment_instrument', 'participant_role', 'event_type')");
return TRUE;
}
}
if (!empty($problemValues)) {
- $strings = array();
+ $strings = '';
foreach ($problemValues as $problemValue) {
- $strings[] = ts('<tr><td> "%1" </td><td> "%2" </td></tr>', array(
+ $strings .= ts('<tr><td> "%1" </td><td> "%2" </td></tr>', array(
1 => $problemValue['group_name'],
2 => $problemValue['value_name'],
));
__FUNCTION__,
ts('The Following Option Values contain value fields that do not match the Data Type of the Option Group</p>
<p><table><tbody><th>Option Group</th><th>Option Value</th></tbody><tbody>') .
- implode('\n', $strings) . ts('</tbody></table></p>'),
+ $strings . ts('</tbody></table></p>'),
ts('Option Values with problematic Values'),
\Psr\Log\LogLevel::NOTICE,
'fa-server'