Move PConfig::set() to DI::pConfig()->set()

This commit is contained in:
nupplaPhil 2020-01-18 16:54:49 +01:00
parent ea3a9052d8
commit febc835a2d
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
42 changed files with 185 additions and 185 deletions

View file

@ -85,9 +85,9 @@ function securemail_settings_post(App &$a, array &$b)
}
if ($_POST['securemail-submit']) {
PConfig::set(local_user(), 'securemail', 'pkey', trim($_POST['securemail-pkey']));
DI::pConfig()->set(local_user(), 'securemail', 'pkey', trim($_POST['securemail-pkey']));
$enable = (!empty($_POST['securemail-enable']) ? 1 : 0);
PConfig::set(local_user(), 'securemail', 'enable', $enable);
DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);
info(L10n::t('Secure Mail Settings saved.') . EOL);
if ($_POST['securemail-submit'] == L10n::t('Save and send test')) {
@ -117,12 +117,12 @@ function securemail_settings_post(App &$a, array &$b)
];
// enable addon for test
PConfig::set(local_user(), 'securemail', 'enable', 1);
DI::pConfig()->set(local_user(), 'securemail', 'enable', 1);
$res = Emailer::send($params);
// revert to saved value
PConfig::set(local_user(), 'securemail', 'enable', $enable);
DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);
if ($res) {
info(L10n::t('Test email sent') . EOL);