Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port to 4.0.x from 436: Include dblocale table names in list of civicrm entity info #438

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/SupportedEntities.php
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,22 @@ public static function getInfo() {
if (!in_array($entity_info['civicrm entity name'], $api_entity_types)) {
unset($civicrm_entity_info[$entity_type]);
}
// Insert dblocale table names
$multilingual = \CRM_Core_I18n::isMultilingual();
if ($multilingual) {
// @codingStandardsIgnoreStart
global $dbLocale;
// @codingStandardsIgnoreEnd
if ($dbLocale) {
$tables = \CRM_Core_I18n_Schema::schemaStructureTables();
if (in_array($entity_type, $tables)) {
$locale_table_name = $entity_type . $dbLocale;
if (strlen($locale_table_name) <= 32) {
$civicrm_entity_info[$locale_table_name] = $entity_info;
}
}
}
}
}
return $civicrm_entity_info;
}
Expand Down
Loading