1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

minor fixes for usage of client portal subdomains in self hosted instances

This commit is contained in:
David Bomba 2022-11-24 09:37:14 +11:00
parent 7d589c5a7c
commit 3994abd10f
2 changed files with 4 additions and 14 deletions

View File

@ -65,18 +65,8 @@ class StoreCompanyRequest extends Request
$input['google_analytics_key'] = $input['google_analytics_url'];
}
// $company_settings = CompanySettings::defaults();
//@todo this code doesn't make sense as we never return $company_settings anywhere
//@deprecated???
// if (array_key_exists('settings', $input) && ! empty($input['settings'])) {
// foreach ($input['settings'] as $key => $value) {
// $company_settings->{$key} = $value;
// }
// }
if (array_key_exists('portal_domain', $input)) {
$input['portal_domain'] = strtolower($input['portal_domain']);
$input['portal_domain'] = rtrim(strtolower($input['portal_domain']), "/");
}
$this->replace($input);

View File

@ -68,7 +68,7 @@ trait Inviteable
);
$writer = new Writer($renderer);
$qr = $writer->writeString($this->getPaymentLink());
$qr = $writer->writeString($this->getPaymentLink(), 'utf-8');
return "<svg viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
<rect x='0' y='0' width='100%'' height='100%' />{$qr}</svg>";
@ -80,7 +80,7 @@ trait Inviteable
if (Ninja::isHosted()) {
$domain = $this->company->domain();
} else {
$domain = config('ninja.app_url');
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url');
}
$entity_type = Str::snake(class_basename($this->entityType()));
@ -121,7 +121,7 @@ trait Inviteable
if (Ninja::isHosted()) {
$domain = $this->company->domain();
} else {
$domain = config('ninja.app_url');
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url');
}
switch ($this->company->portal_mode) {