@@ 913-919 (lines=7) @@ | ||
910 | } |
|
911 | ||
912 | // check if Elasticsearch is enabled |
|
913 | if (!is_null($esEnabled) && count($esSetup)) { |
|
914 | if (!$instanceSetup->createElasticsearchFile($esSetup, '')) { |
|
915 | echo '<p class="alert alert-danger"><strong>Error:</strong> Setup cannot write to ./config/elasticsearch.php.</p>'; |
|
916 | $this->system->cleanInstallation(); |
|
917 | System::renderFooter(true); |
|
918 | } |
|
919 | } |
|
920 | ||
921 | // connect to the database using config/database.php |
|
922 | require $rootDir.'/config/database.php'; |
|
@@ 994-1002 (lines=9) @@ | ||
991 | ||
992 | // add admin account and rights |
|
993 | $admin = new User($configuration); |
|
994 | if (!$admin->createUser($loginname, $password, null, 1)) { |
|
995 | printf( |
|
996 | '<p class="alert alert-danger"><strong>Fatal installation error:</strong><br>'. |
|
997 | "Couldn't create the admin user: %s</p>\n", |
|
998 | $admin->error() |
|
999 | ); |
|
1000 | $this->system->cleanInstallation(); |
|
1001 | System::renderFooter(true); |
|
1002 | } |
|
1003 | $admin->setStatus('protected'); |
|
1004 | $adminData = [ |
|
1005 | 'display_name' => $realname, |