1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00

Merge pull request #7303 from turbo124/v5-stable

v5.3.72
This commit is contained in:
David Bomba 2022-03-18 10:36:38 +11:00 committed by GitHub
commit 3a9dc90d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 47 deletions

View File

@ -1 +1 @@
5.3.71 5.3.72

View File

@ -61,10 +61,7 @@ class PostUpdate extends Command
try { try {
if(Ninja::isHosted()) Artisan::call('optimize');
Artisan::call('optimize');
else
Artisan::call('config:clear');
} catch (\Exception $e) { } catch (\Exception $e) {
info("I wasn't able to optimize."); info("I wasn't able to optimize.");

View File

@ -81,7 +81,7 @@ class SelfUpdateController extends BaseController
Artisan::call('clear-compiled'); Artisan::call('clear-compiled');
Artisan::call('route:clear'); Artisan::call('route:clear');
Artisan::call('view:clear'); Artisan::call('view:clear');
Artisan::call('config:clear'); Artisan::call('optimize');
return response()->json(['message' => 'Update completed'], 200); return response()->json(['message' => 'Update completed'], 200);

View File

@ -74,34 +74,6 @@ 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 {
// $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(),
// ]);
// }
// 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(),
// ]);
// }
$mail_driver = $request->input('mail_driver'); $mail_driver = $request->input('mail_driver');
$url = $request->input('url'); $url = $request->input('url');
@ -164,15 +136,8 @@ class SetupController extends Controller
define('STDIN', fopen('php://stdin', 'r')); define('STDIN', fopen('php://stdin', 'r'));
/* Make sure no stale connections are cached */ /* Make sure no stale connections are cached */
DB::purge('db-ninja-01'); DB::purge('mysql');
//DB::reconnect('db-ninja-01'); Artisan::call('optimize');
/* Run migrations */
if (!config('ninja.disable_auto_update')) {
Artisan::call('config:clear');
// Artisan::call('optimize');
}
Artisan::call('migrate', ['--force' => true]); Artisan::call('migrate', ['--force' => true]);
Artisan::call('db:seed', ['--force' => true]); Artisan::call('db:seed', ['--force' => true]);
@ -295,6 +260,30 @@ class SetupController extends Controller
} }
} }
public function clearCompiledCache()
{
$cacheCompiled = base_path('bootstrap/cache/compiled.php');
if (file_exists($cacheCompiled)) {
unlink ($cacheCompiled);
}
$cacheServices = base_path('bootstrap/cache/packages.php');
if (file_exists($cacheServices)) {
unlink ($cacheServices);
}
$cacheServices = base_path('bootstrap/cache/services.php');
if (file_exists($cacheServices)) {
unlink ($cacheServices);
}
$cacheRoute = base_path('bootstrap/cache/routes-v7.php');
if (file_exists($cacheRoute)) {
unlink ($cacheRoute);
}
}
public function update() public function update()
{ {
@ -319,7 +308,7 @@ class SetupController extends Controller
Artisan::call('clear-compiled'); Artisan::call('clear-compiled');
Artisan::call('route:clear'); Artisan::call('route:clear');
Artisan::call('view:clear'); Artisan::call('view:clear');
Artisan::call('config:clear'); Artisan::call('optimize');
Artisan::call('migrate', ['--force' => true]); Artisan::call('migrate', ['--force' => true]);
Artisan::call('db:seed', ['--force' => true]); Artisan::call('db:seed', ['--force' => true]);

View File

@ -52,7 +52,7 @@ class SchedulerCheck implements ShouldQueue
try { try {
Artisan::call('clear-compiled'); Artisan::call('clear-compiled');
Artisan::call('route:clear'); Artisan::call('route:clear');
Artisan::call('config:cache'); Artisan::call('optimize');
} catch (\Exception $e) { } catch (\Exception $e) {
nlog("I wasn't able to optimize."); nlog("I wasn't able to optimize.");
nlog($e->getMessage()); nlog($e->getMessage());

View File

@ -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.71', 'app_version' => '5.3.72',
'app_tag' => '5.3.71', 'app_tag' => '5.3.72',
'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', ''),