mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
020b89a3cc
@ -1 +1 @@
|
|||||||
5.3.4
|
5.3.5
|
@ -73,55 +73,69 @@ class SetupController extends Controller
|
|||||||
return response('Oops, something went wrong. Check your logs.'); /* We should never reach this block, but just in case. */
|
return response('Oops, something went wrong. Check your logs.'); /* We should never reach this block, but just in case. */
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
$db = SystemHealth::dbCheck($request);
|
// $db = SystemHealth::dbCheck($request);
|
||||||
|
|
||||||
if ($db['success'] == false) {
|
// if ($db['success'] == false) {
|
||||||
throw new Exception($db['message']);
|
// throw new Exception($db['message']);
|
||||||
}
|
// }
|
||||||
} catch (Exception $e) {
|
// } catch (Exception $e) {
|
||||||
return response([
|
// return response([
|
||||||
'message' => 'Oops, connection to database was not successful.',
|
// 'message' => 'Oops, connection to database was not successful.',
|
||||||
'error' => $e->getMessage(),
|
// 'error' => $e->getMessage(),
|
||||||
]);
|
// ]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
if ($request->mail_driver != 'log') {
|
// if ($request->mail_driver != 'log') {
|
||||||
$smtp = SystemHealth::testMailServer($request);
|
// $smtp = SystemHealth::testMailServer($request);
|
||||||
|
|
||||||
if ($smtp['success'] == false) {
|
// if ($smtp['success'] == false) {
|
||||||
throw new Exception($smtp['message']);
|
// throw new Exception($smtp['message']);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} catch (Exception $e) {
|
// } catch (Exception $e) {
|
||||||
return response([
|
// return response([
|
||||||
'message' => 'Oops, connection to mail server was not successful.',
|
// 'message' => 'Oops, connection to mail server was not successful.',
|
||||||
'error' => $e->getMessage(),
|
// 'error' => $e->getMessage(),
|
||||||
]);
|
// ]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$mail_driver = $request->input('mail_driver');
|
$mail_driver = $request->input('mail_driver');
|
||||||
|
|
||||||
|
$url = $request->input('url');
|
||||||
|
$db_host = $request->input('db_host');
|
||||||
|
$db_port = $request->input('db_port');
|
||||||
|
$db_database = $request->input('db_database');
|
||||||
|
$db_username = $request->input('db_username');
|
||||||
|
$db_password = $request->input('db_password');
|
||||||
|
$mail_port = $request->input('mail_port');
|
||||||
|
$encryption = $request->input('encryption');
|
||||||
|
$mail_host = $request->input('mail_host');
|
||||||
|
$mail_username = $request->input('mail_username');
|
||||||
|
$mail_name = $request->input('mail_name');
|
||||||
|
$mail_address = $request->input('mail_address');
|
||||||
|
$mail_password = $request->input('mail_password');
|
||||||
|
|
||||||
$env_values = [
|
$env_values = [
|
||||||
'APP_URL' => $request->input('url'),
|
'APP_URL' => $url,
|
||||||
'REQUIRE_HTTPS' => $request->input('https') ? 'true' : 'false',
|
'REQUIRE_HTTPS' => $request->input('https') ? 'true' : 'false',
|
||||||
'APP_DEBUG' => 'false',
|
'APP_DEBUG' => 'false',
|
||||||
|
|
||||||
'DB_HOST' => $request->input('db_host'),
|
'DB_HOST' => $db_host,
|
||||||
'DB_PORT' => $request->input('db_port'),
|
'DB_PORT' => $db_port,
|
||||||
'DB_DATABASE' => $request->input('db_database'),
|
'DB_DATABASE' => $db_database,
|
||||||
'DB_USERNAME' => $request->input('db_username'),
|
'DB_USERNAME' => $db_username,
|
||||||
'DB_PASSWORD' => $request->input('db_password'),
|
'DB_PASSWORD' => $db_password,
|
||||||
|
|
||||||
'MAIL_MAILER' => $mail_driver,
|
'MAIL_MAILER' => $mail_driver,
|
||||||
'MAIL_PORT' => $request->input('mail_port'),
|
'MAIL_PORT' => $mail_port,
|
||||||
'MAIL_ENCRYPTION' => $request->input('encryption'),
|
'MAIL_ENCRYPTION' => $encryption,
|
||||||
'MAIL_HOST' => $request->input('mail_host'),
|
'MAIL_HOST' => $mail_host,
|
||||||
'MAIL_USERNAME' => $request->input('mail_username'),
|
'MAIL_USERNAME' => $mail_username,
|
||||||
'MAIL_FROM_NAME' => $request->input('mail_name'),
|
'MAIL_FROM_NAME' => $mail_name,
|
||||||
'MAIL_FROM_ADDRESS' => $request->input('mail_address'),
|
'MAIL_FROM_ADDRESS' => $mail_address,
|
||||||
'MAIL_PASSWORD' => $request->input('mail_password'),
|
'MAIL_PASSWORD' => $mail_password,
|
||||||
|
|
||||||
'NINJA_ENVIRONMENT' => 'selfhost',
|
'NINJA_ENVIRONMENT' => 'selfhost',
|
||||||
'DB_CONNECTION' => 'mysql',
|
'DB_CONNECTION' => 'mysql',
|
||||||
@ -150,7 +164,8 @@ class SetupController extends Controller
|
|||||||
|
|
||||||
/* Make sure no stale connections are cached */
|
/* Make sure no stale connections are cached */
|
||||||
DB::purge('db-ninja-01');
|
DB::purge('db-ninja-01');
|
||||||
|
//DB::reconnect('db-ninja-01');
|
||||||
|
|
||||||
/* Run migrations */
|
/* Run migrations */
|
||||||
if (!config('ninja.disable_auto_update')) {
|
if (!config('ninja.disable_auto_update')) {
|
||||||
Artisan::call('optimize');
|
Artisan::call('optimize');
|
||||||
|
@ -231,6 +231,7 @@ class SystemHealth
|
|||||||
config(['mail.encryption' => $request->input('encryption')]);
|
config(['mail.encryption' => $request->input('encryption')]);
|
||||||
config(['mail.username' => $request->input('mail_username')]);
|
config(['mail.username' => $request->input('mail_username')]);
|
||||||
config(['mail.password' => $request->input('mail_password')]);
|
config(['mail.password' => $request->input('mail_password')]);
|
||||||
|
(new \Illuminate\Mail\MailServiceProvider(app()))->register();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -118,9 +118,9 @@ trait AppSetup
|
|||||||
|
|
||||||
private function updateEnvironmentProperty(string $property, $value): void
|
private function updateEnvironmentProperty(string $property, $value): void
|
||||||
{
|
{
|
||||||
if (Str::contains($value, '#')) {
|
// if (Str::contains($value, '#')) {
|
||||||
$value = sprintf('"%s"', $value);
|
// $value = sprintf('"%s"', $value);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$env = file(base_path('.env'));
|
$env = file(base_path('.env'));
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => '5.3.4',
|
'app_version' => '5.3.5',
|
||||||
'app_tag' => '5.3.4',
|
'app_tag' => '5.3.5',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', ''),
|
'api_secret' => env('API_SECRET', ''),
|
||||||
|
Loading…
Reference in New Issue
Block a user