X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialBotPasswords.php;h=1027f1f6e83efac8f9c00bbb5ade19c91f7326f2;hb=5cbada9dea3f22e7bb33250197b156e8628b8e4a;hp=abb4e111219878a2746e7b17d83f22c32663ca39;hpb=50f1f3ad9a3741fb6d991458ad8332a678755e94;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBotPasswords.php b/includes/specials/SpecialBotPasswords.php index abb4e11121..1027f1f6e8 100644 --- a/includes/specials/SpecialBotPasswords.php +++ b/includes/specials/SpecialBotPasswords.php @@ -84,9 +84,6 @@ class SpecialBotPasswords extends FormSpecialPage { } protected function getFormFields() { - $user = $this->getUser(); - $request = $this->getRequest(); - $fields = []; if ( $this->par !== null ) { @@ -316,20 +313,21 @@ class SpecialBotPasswords extends FormSpecialPage { 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; } @@ -338,7 +336,7 @@ class SpecialBotPasswords extends FormSpecialPage { $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;