ref
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
use Espo\Core\Application;
|
||||
use Espo\Core\Container;
|
||||
use Espo\Core\DataManager;
|
||||
use Espo\Core\InjectableFactory;
|
||||
use Espo\Core\ORM\DatabaseParamsFactory;
|
||||
use Espo\Core\Utils\Id\RecordIdGenerator;
|
||||
@@ -408,20 +409,16 @@ class Installer
|
||||
return true;
|
||||
}
|
||||
|
||||
public function buildDatabase()
|
||||
public function rebuild(): void
|
||||
{
|
||||
try {
|
||||
$this->app->getContainer()->get('dataManager')->rebuild();
|
||||
|
||||
return true;
|
||||
$this->app->getContainer()->getByClass(DataManager::class)->rebuild();
|
||||
}
|
||||
catch (Exception) {
|
||||
$this->auth();
|
||||
|
||||
$this->app->getContainer()->get('dataManager')->rebuild();
|
||||
$this->app->getContainer()->getByClass(DataManager::class)->rebuild();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function savePreferences(array $rawPreferences)
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
ob_start();
|
||||
$result = array('success' => true, 'errorMsg' => '');
|
||||
|
||||
$installer->buildDatabase();
|
||||
$installer->rebuild();
|
||||
|
||||
ob_clean();
|
||||
echo json_encode($result);
|
||||
echo json_encode($result);
|
||||
|
||||
@@ -330,7 +330,7 @@ class Tester
|
||||
$this->dropTables();
|
||||
|
||||
$installer = new \Installer(); //reload installer to get all config data
|
||||
$installer->buildDatabase();
|
||||
$installer->rebuild();
|
||||
$installer->setSuccess();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user