Skip to content

Commit 01be344

Browse files
committed
Multilingual upgrader fixes
1 parent 03e1ef6 commit 01be344

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

CRM/Core/I18n/Schema.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,15 +315,14 @@ public static function rebuildMultilingualSchema($locales, $version = NULL, $isU
315315
}
316316
}
317317

318-
// rebuild triggers
319-
$last = array_pop($locales);
320-
321318
foreach ($queries as $query) {
322319
$dao->query($query, FALSE);
323320
}
324321

325322
// invoke the meta trigger creation call
326-
CRM_Core_DAO::triggerRebuild();
323+
if (!$isUpgradeMode) {
324+
CRM_Core_DAO::triggerRebuild();
325+
}
327326
}
328327

329328
/**

CRM/Upgrade/Incremental/Base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public static function alterSchemaField($ctx, string $entityName, string $fieldN
409409
if ($position) {
410410
$fieldSql .= " $position";
411411
}
412-
if (CRM_Core_BAO_SchemaHandler::checkIfFieldExists($tableName, $fieldName, FALSE)) {
412+
if (CRM_Core_BAO_SchemaHandler::checkIfFieldExists($tableName, $fieldName)) {
413413
return self::alterColumn($ctx, $tableName, $fieldName, $fieldSql, !empty($fieldSpec['localizable']));
414414
}
415415
else {

ext/financialacls/tests/phpunit/Civi/Financialacls/MembershipTypesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ public function testMembershipTypePage(): void {
6161
protected function setUpMembershipTypesACLLimited(): Result {
6262
$types = MembershipType::save(FALSE)
6363
->setRecords([
64-
['name' => 'Forbidden', 'financial_type_id:name' => 'Member Dues', 'weight' => 1],
65-
['name' => 'Go for it', 'financial_type_id:name' => 'Donation', 'weight' => 2],
64+
['title' => 'Forbidden', 'financial_type_id:name' => 'Member Dues', 'weight' => 1],
65+
['title' => 'Go for it', 'financial_type_id:name' => 'Donation', 'weight' => 2],
6666
])
6767
->setDefaults(['period_type' => 'rolling', 'member_of_contact_id' => 1, 'duration_unit' => 'month'])
6868
->execute()
69-
->indexBy('name');
69+
->indexBy('title');
7070
$this->setupLoggedInUserWithLimitedFinancialTypeAccess();
7171
return $types;
7272
}

0 commit comments

Comments
 (0)