Issue 9153 Use "info" instead of "notice" on successful operations

This commit is contained in:
Michael 2020-09-07 10:17:42 +00:00
parent b530ef709d
commit f56e765158
10 changed files with 17 additions and 17 deletions

View file

@ -187,7 +187,7 @@ class Crop extends BaseSettings
Worker::add(PRIORITY_LOW, 'Directory', Session::get('my_url'));
}
notice(DI::l10n()->t('Profile picture successfully updated.'));
info(DI::l10n()->t('Profile picture successfully updated.'));
DI::baseUrl()->redirect('profile/' . DI::app()->user['nickname']);
}

View file

@ -74,13 +74,13 @@ class AppSpecific extends BaseSettings
DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));
} else {
self::$appSpecificPassword = AppSpecificPassword::generateForUser(local_user(), $_POST['description'] ?? '');
notice(DI::l10n()->t('New app-specific password generated.'));
info(DI::l10n()->t('New app-specific password generated.'));
}
break;
case 'revoke_all' :
AppSpecificPassword::deleteAllForUser(local_user());
notice(DI::l10n()->t('App-specific passwords successfully revoked.'));
info(DI::l10n()->t('App-specific passwords successfully revoked.'));
DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));
break;
}
@ -90,7 +90,7 @@ class AppSpecific extends BaseSettings
self::checkFormSecurityTokenRedirectOnError('settings/2fa/app_specific', 'settings_2fa_app_specific');
if (AppSpecificPassword::deleteForUser(local_user(), $_POST['revoke_id'])) {
notice(DI::l10n()->t('App-specific password successfully revoked.'));
info(DI::l10n()->t('App-specific password successfully revoked.'));
}
DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));

View file

@ -64,7 +64,7 @@ class Index extends BaseSettings
DI::pConfig()->delete(local_user(), '2fa', 'verified');
Session::remove('2fa');
notice(DI::l10n()->t('Two-factor authentication successfully disabled.'));
info(DI::l10n()->t('Two-factor authentication successfully disabled.'));
DI::baseUrl()->redirect('settings/2fa');
}
break;

View file

@ -63,7 +63,7 @@ class Recovery extends BaseSettings
if ($_POST['action'] == 'regenerate') {
RecoveryCode::regenerateForUser(local_user());
notice(DI::l10n()->t('New recovery codes successfully generated.'));
info(DI::l10n()->t('New recovery codes successfully generated.'));
DI::baseUrl()->redirect('settings/2fa/recovery?t=' . self::getFormSecurityToken('settings_2fa_password'));
}
}

View file

@ -75,7 +75,7 @@ class Verify extends BaseSettings
DI::pConfig()->set(local_user(), '2fa', 'verified', true);
Session::set('2fa', true);
notice(DI::l10n()->t('Two-factor authentication successfully activated.'));
info(DI::l10n()->t('Two-factor authentication successfully activated.'));
DI::baseUrl()->redirect('settings/2fa');
} else {