public function onSuccess() {
$out = $this->getOutput();
+ $username = $this->getUser()->getName();
switch ( $this->operation ) {
case 'insert':
$out->setPageTitle( $this->msg( 'botpasswords-created-title' )->text() );
- $out->addWikiMsg( 'botpasswords-created-body', $this->par );
+ $out->addWikiMsg( 'botpasswords-created-body', $this->par, $username );
break;
case 'update':
$out->setPageTitle( $this->msg( 'botpasswords-updated-title' )->text() );
- $out->addWikiMsg( 'botpasswords-updated-body', $this->par );
+ $out->addWikiMsg( 'botpasswords-updated-body', $this->par, $username );
break;
case 'delete':
$out->setPageTitle( $this->msg( 'botpasswords-deleted-title' )->text() );
- $out->addWikiMsg( 'botpasswords-deleted-body', $this->par );
+ $out->addWikiMsg( 'botpasswords-deleted-body', $this->par, $username );
$this->password = null;
break;
}
$sep = BotPassword::getSeparator();
$out->addWikiMsg(
'botpasswords-newpassword',
- htmlspecialchars( $this->getUser()->getName() . $sep . $this->par ),
+ htmlspecialchars( $username . $sep . $this->par ),
htmlspecialchars( $this->password )
);
$this->password = null;
"botpasswords-insert-failed": "Failed to add bot name \"$1\". Was it already added?",
"botpasswords-update-failed": "Failed to update bot name \"$1\". Was it deleted?",
"botpasswords-created-title": "Bot password created",
- "botpasswords-created-body": "The bot password \"$1\" was created.",
+ "botpasswords-created-body": "The bot password for bot name \"$1\" of user \"$2\" was created.",
"botpasswords-updated-title": "Bot password updated",
- "botpasswords-updated-body": "The bot password \"$1\" was updated.",
+ "botpasswords-updated-body": "The bot password for bot name \"$1\" of user \"$2\" was updated.",
"botpasswords-deleted-title": "Bot password deleted",
- "botpasswords-deleted-body": "The bot password \"$1\" was deleted.",
+ "botpasswords-deleted-body": "The bot password for bot name \"$1\" of user \"$2\" was deleted.",
"botpasswords-newpassword": "The new password to log in with <strong>$1</strong> is <strong>$2</strong>. <em>Please record this for future reference.</em>",
"botpasswords-no-provider": "BotPasswordsSessionProvider is not available.",
"botpasswords-restriction-failed": "Bot password restrictions prevent this login.",
"botpasswords-insert-failed": "Error message when saving a new bot password failed. It's likely that the failure was because the user resubmitted the form after a previous successful save. Parameters:\n* $1 - Bot name",
"botpasswords-update-failed": "Error message when saving changes to an existing bot password failed. It's likely that the failure was because the user deleted the bot password in another browser window. Parameters:\n* $1 - Bot name",
"botpasswords-created-title": "Title of the success page when a new bot password is created.",
- "botpasswords-created-body": "Success message when a new bot password is created. Parameters:\n* $1 - Bot name",
+ "botpasswords-created-body": "Success message when a new bot password is created. Parameters:\n* $1 - Bot name\n* $2 - User name",
"botpasswords-updated-title": "Title of the success page when a bot password is updated.",
- "botpasswords-updated-body": "Success message when a bot password is updated. Parameters:\n* $1 - Bot name",
+ "botpasswords-updated-body": "Success message when a bot password is updated. Parameters:\n* $1 - Bot name\n* $2 - User name",
"botpasswords-deleted-title": "Title of the success page when a bot password is deleted.",
- "botpasswords-deleted-body": "Success message when a bot password is deleted. Parameters:\n* $1 - Bot name",
+ "botpasswords-deleted-body": "Success message when a bot password is deleted. Parameters:\n* $1 - Bot name\n* $2 - User name",
"botpasswords-newpassword": "Success message to display the new password when a bot password is created or updated. Parameters:\n* $1 - User name to be used for login.\n* $2 - Password to be used for login.",
"botpasswords-no-provider": "Error message when login is attempted but the BotPasswordsSessionProvider is not included in <code>$wgSessionProviders</code>.",
"botpasswords-restriction-failed": "Error message when login is rejected because the configured restrictions were not satisfied.",