r86972 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86971‎ | r86972 | r86973 >
Date:19:13, 26 April 2011
Author:nimishg
Status:ok
Tags:
Comment:
mft r86011, for real this time
Modified paths:
  • /branches/wmf/1.17wmf1/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/specials/SpecialUserlogin.php
@@ -872,9 +872,13 @@
873873 global $wgUser;
874874 # Run any hooks; display injected HTML
875875 $injected_html = '';
 876+ $welcome_creation_msg = 'welcomecreation';
876877 wfRunHooks( 'UserLoginComplete', array( &$wgUser, &$injected_html ) );
877878
878 - $this->displaySuccessfulLogin( 'welcomecreation', $injected_html );
 879+ //let any extensions change what message is shown
 880+ wfRunHooks( 'BeforeWelcomeCreation', array( &$welcome_creation_msg, &$injected_html ) );
 881+
 882+ $this->displaySuccessfulLogin( $welcome_creation_msg, $injected_html );
879883 }
880884
881885 /**
@@ -886,7 +890,9 @@
887891 $wgOut->setPageTitle( wfMsg( 'loginsuccesstitle' ) );
888892 $wgOut->setRobotPolicy( 'noindex,nofollow' );
889893 $wgOut->setArticleRelated( false );
890 - $wgOut->addWikiMsg( $msgname, $wgUser->getName() );
 894+ if( $msgname ){
 895+ $wgOut->addWikiMsg( $msgname, $wgUser->getName() );
 896+ }
891897 $wgOut->addHTML( $injected_html );
892898
893899 if ( !empty( $this->mReturnTo ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86011Created BeforeWelcomeCreation hook to be run before any welcome message gets ...nimishg23:47, 13 April 2011
r86960mft r86011nimishg18:07, 26 April 2011

Status & tagging log