Move Config::get() to DI::config()->get()
This commit is contained in:
parent
c67ad31c8b
commit
1ce63185ab
38 changed files with 342 additions and 342 deletions
|
@ -46,18 +46,18 @@ function notifyall_post(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
$sitename = Config::get('config', 'sitename');
|
||||
$sitename = DI::config()->get('config', 'sitename');
|
||||
|
||||
if (empty(Config::get('config', 'admin_name'))) {
|
||||
if (empty(DI::config()->get('config', 'admin_name'))) {
|
||||
$sender_name = '"' . DI::l10n()->t('%s Administrator', $sitename) . '"';
|
||||
} else {
|
||||
$sender_name = '"' . DI::l10n()->t('%1$s, %2$s Administrator', Config::get('config', 'admin_name'), $sitename) . '"';
|
||||
$sender_name = '"' . DI::l10n()->t('%1$s, %2$s Administrator', DI::config()->get('config', 'admin_name'), $sitename) . '"';
|
||||
}
|
||||
|
||||
if (!Config::get('config', 'sender_email')) {
|
||||
if (!DI::config()->get('config', 'sender_email')) {
|
||||
$sender_email = 'noreply@' . DI::baseUrl()->getHostname();
|
||||
} else {
|
||||
$sender_email = Config::get('config', 'sender_email');
|
||||
$sender_email = DI::config()->get('config', 'sender_email');
|
||||
}
|
||||
|
||||
$subject = $_REQUEST['subject'];
|
||||
|
@ -70,7 +70,7 @@ function notifyall_post(App $a)
|
|||
// if this is a test, send it only to the admin(s)
|
||||
// admin_email might be a comma separated list, but we need "a@b','c@d','e@f
|
||||
if (intval($_REQUEST['test'])) {
|
||||
$email = Config::get('config', 'admin_email');
|
||||
$email = DI::config()->get('config', 'admin_email');
|
||||
$email = "'" . str_replace([" ",","], ["","','"], $email) . "'";
|
||||
}
|
||||
$sql_extra = ((intval($_REQUEST['test'])) ? sprintf(" AND `email` in ( %s )", $email) : '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue