mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop
This commit is contained in:
commit
2b5c58f607
@ -738,6 +738,10 @@ class BaseController extends Controller
|
||||
return redirect()->secure(request()->getRequestUri());
|
||||
}
|
||||
|
||||
/* Clean up URLs and remove query parameters from the URL*/
|
||||
if(request()->has('login') && request()->input('login') == 'true')
|
||||
return redirect('/')->with(['login' => "true"]);
|
||||
|
||||
$data = [];
|
||||
|
||||
//pass report errors bool to front end
|
||||
@ -748,6 +752,9 @@ class BaseController extends Controller
|
||||
$data['build'] = request()->has('build') ? request()->input('build') : '';
|
||||
$data['login'] = request()->has('login') ? request()->input('login') : "false";
|
||||
|
||||
if(request()->session()->has('login'))
|
||||
$data['login'] = "true";
|
||||
|
||||
$data['user_agent'] = request()->server('HTTP_USER_AGENT');
|
||||
|
||||
$data['path'] = $this->setBuild();
|
||||
|
@ -84,9 +84,19 @@ class SystemHealth
|
||||
'jobs_pending' => (int) Queue::size(),
|
||||
'pdf_engine' => (string) self::getPdfEngine(),
|
||||
'queue' => (string) config('queue.default'),
|
||||
'trailing_slash' => (bool) self::checkUrlState(),
|
||||
];
|
||||
}
|
||||
|
||||
public static function checkUrlState()
|
||||
{
|
||||
if (env('APP_URL') && substr(env('APP_URL'), -1) == '/')
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public static function getPdfEngine()
|
||||
{
|
||||
if(config('ninja.invoiceninja_hosted_pdf_generation') || config('ninja.pdf_generator') == 'hosted_ninja')
|
||||
|
Loading…
x
Reference in New Issue
Block a user