X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FSystem.php;h=41646c5ef31a8ee0cf6bf1c50f496124721222d9;hb=293d50b4211dcd40bd421da0047f7fb4833fdcbf;hp=b4b4974bf0d738cef32a7efb2dbfaf023f0c10a0;hpb=a1c77a65764fb8c6b5af88096357eebb3873493f;p=civicrm-core.git diff --git a/api/v3/System.php b/api/v3/System.php index b4b4974bf0..41646c5ef3 100644 --- a/api/v3/System.php +++ b/api/v3/System.php @@ -1,7 +1,7 @@ getMissingLogTables(); + if (!empty($missingLogTables)) { + foreach ($missingLogTables as $tableName) { + $schema->fixSchemaDifferencesFor($tableName, NULL, FALSE); + } + } + return civicrm_api3_create_success(1); +} + +/** + * Rebuild Multilingual Schema + * + */ +function civicrm_api3_system_rebuildmultilingualschema() { + $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); + return civicrm_api3_create_success(1); + } + else { + throw new API_Exception('Cannot call rebuild Multilingual schema on non Multilingual database'); + } +}