mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 05:44:32 -04:00
Update AppController.php
Add quotes to MAIL_FROM_NAME when needed
This commit is contained in:
parent
aae4f57c09
commit
2c6e9aced3
@ -96,9 +96,15 @@ class AppController extends BaseController
|
|||||||
"MAIL_PORT={$mail['port']}\n".
|
"MAIL_PORT={$mail['port']}\n".
|
||||||
"MAIL_ENCRYPTION={$mail['encryption']}\n".
|
"MAIL_ENCRYPTION={$mail['encryption']}\n".
|
||||||
"MAIL_HOST={$mail['host']}\n".
|
"MAIL_HOST={$mail['host']}\n".
|
||||||
"MAIL_USERNAME={$mail['username']}\n".
|
"MAIL_USERNAME={$mail['username']}\n";
|
||||||
"MAIL_FROM_NAME={$mail['from']['name']}\n".
|
|
||||||
"MAIL_PASSWORD={$mail['password']}\n\n".
|
if (preg_match('/\s/',$mail['from']['name'])) {
|
||||||
|
$config .= "MAIL_FROM_NAME='{$mail['from']['name']}'\n".
|
||||||
|
} else {
|
||||||
|
$config .= "MAIL_FROM_NAME={$mail['from']['name']}\n".
|
||||||
|
}
|
||||||
|
|
||||||
|
$config .= "MAIL_PASSWORD={$mail['password']}\n\n".
|
||||||
"PHANTOMJS_CLOUD_KEY='a-demo-key-with-low-quota-per-ip-address'";
|
"PHANTOMJS_CLOUD_KEY='a-demo-key-with-low-quota-per-ip-address'";
|
||||||
|
|
||||||
// Write Config Settings
|
// Write Config Settings
|
||||||
@ -166,6 +172,9 @@ class AppController extends BaseController
|
|||||||
|
|
||||||
$config = '';
|
$config = '';
|
||||||
foreach ($_ENV as $key => $val) {
|
foreach ($_ENV as $key => $val) {
|
||||||
|
if (preg_match('/\s/',$val)) {
|
||||||
|
$val = "'{$val}'";
|
||||||
|
}
|
||||||
$config .= "{$key}={$val}\n";
|
$config .= "{$key}={$val}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,4 +320,4 @@ class AppController extends BaseController
|
|||||||
|
|
||||||
return json_encode($data);
|
return json_encode($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user