mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
d69a4a3645
@ -55,12 +55,17 @@ class StoreCompanyRequest extends Request
|
|||||||
{
|
{
|
||||||
$input = $this->all();
|
$input = $this->all();
|
||||||
|
|
||||||
|
if(strlen($input['portal_domain']) > 1)
|
||||||
|
$input['portal_domain'] = str_replace("http:", "https:", $input['portal_domain']);
|
||||||
|
|
||||||
if (array_key_exists('google_analytics_url', $input)) {
|
if (array_key_exists('google_analytics_url', $input)) {
|
||||||
$input['google_analytics_key'] = $input['google_analytics_url'];
|
$input['google_analytics_key'] = $input['google_analytics_url'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$company_settings = CompanySettings::defaults();
|
$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'])) {
|
if (array_key_exists('settings', $input) && ! empty($input['settings'])) {
|
||||||
foreach ($input['settings'] as $key => $value) {
|
foreach ($input['settings'] as $key => $value) {
|
||||||
$company_settings->{$key} = $value;
|
$company_settings->{$key} = $value;
|
||||||
|
@ -59,7 +59,10 @@ class UpdateCompanyRequest extends Request
|
|||||||
protected function prepareForValidation()
|
protected function prepareForValidation()
|
||||||
{
|
{
|
||||||
$input = $this->all();
|
$input = $this->all();
|
||||||
// nlog($input);
|
|
||||||
|
if(strlen($input['portal_domain']) > 1)
|
||||||
|
$input['portal_domain'] = str_replace("http:", "https:", $input['portal_domain']);
|
||||||
|
|
||||||
if (array_key_exists('settings', $input)) {
|
if (array_key_exists('settings', $input)) {
|
||||||
$input['settings'] = $this->filterSaveableSettings($input['settings']);
|
$input['settings'] = $this->filterSaveableSettings($input['settings']);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ class CreateAccountActivity implements ShouldQueue
|
|||||||
if(Ninja::isHosted())
|
if(Ninja::isHosted())
|
||||||
{
|
{
|
||||||
$nmo = new NinjaMailerObject;
|
$nmo = new NinjaMailerObject;
|
||||||
$nmo->mailable = new Modules\Admin\Mail\Welcome($event->user);
|
$nmo->mailable = new \Modules\Admin\Mail\Welcome($event->user);
|
||||||
$nmo->company = $event->company;
|
$nmo->company = $event->company;
|
||||||
$nmo->settings = $event->company->settings;
|
$nmo->settings = $event->company->settings;
|
||||||
$nmo->to_user = $event->user;
|
$nmo->to_user = $event->user;
|
||||||
|
@ -44,7 +44,7 @@ class CompanyObserver
|
|||||||
nlog($company->getOriginal('portal_domain'));
|
nlog($company->getOriginal('portal_domain'));
|
||||||
|
|
||||||
//fire event to build new custom portal domain
|
//fire event to build new custom portal domain
|
||||||
Modules\Admin\Jobs\Domain\CustomDomain::dispatch($company->getOriginal('portal_domain'), $company);
|
\Modules\Admin\Jobs\Domain\CustomDomain::dispatch($company->getOriginal('portal_domain'), $company);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user