|
@@ 238-242 (lines=5) @@
|
| 235 |
|
$sql_file = $module->getInfo('sqlfile'); |
| 236 |
|
if (!empty($schema_file)) { |
| 237 |
|
$schema_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $schema_file; |
| 238 |
|
if (!XoopsLoad::fileExists($schema_file_path)) { |
| 239 |
|
$this->error[] = |
| 240 |
|
sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$schema_file}</strong>"); |
| 241 |
|
return false; |
| 242 |
|
} |
| 243 |
|
$importer = new ImportSchema; |
| 244 |
|
$importSchema = $importer->importSchemaArray(Yaml::read($schema_file_path)); |
| 245 |
|
$synchronizer = new SingleDatabaseSynchronizer($xoops->db()); |
|
@@ 633-637 (lines=5) @@
|
| 630 |
|
$schema_file = $module->getInfo('schema'); |
| 631 |
|
if (!empty($schema_file)) { |
| 632 |
|
$schema_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $schema_file; |
| 633 |
|
if (!XoopsLoad::fileExists($schema_file_path)) { |
| 634 |
|
$this->error[] = |
| 635 |
|
sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$schema_file}</strong>"); |
| 636 |
|
return false; |
| 637 |
|
} |
| 638 |
|
$importer = new ImportSchema; |
| 639 |
|
$importSchema = $importer->importSchemaArray(Yaml::read($schema_file_path)); |
| 640 |
|
$synchronizer = new SingleDatabaseSynchronizer($xoops->db()); |