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