Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -120,6 +120,8 @@ |
121 | 121 | * (bug 31921) Magic words REVISIONDAY, REVISIONMONTH and REVISIONYEAR now give |
122 | 122 | current values on preview |
123 | 123 | * (bug 29912) Unit tests break if parsertest tables are still present |
| 124 | +* (bug 19186) Special:UserLogin's title on Special:SpecialPages now says |
| 125 | + "create account" when the user cannot create an account |
124 | 126 | |
125 | 127 | === API changes in 1.19 === |
126 | 128 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -139,12 +139,18 @@ |
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
| 143 | + function getDescription() { |
| 144 | + return $this->msg( $this->getUser()->isAllowed( 'createaccount' ) ? |
| 145 | + 'userlogin' : 'userloginnocreate' )->text(); |
| 146 | + } |
| 147 | + |
143 | 148 | public function execute( $par ) { |
144 | 149 | if ( session_id() == '' ) { |
145 | 150 | wfSetupSession(); |
146 | 151 | } |
147 | 152 | |
148 | 153 | $this->load(); |
| 154 | + $this->setHeaders(); |
149 | 155 | |
150 | 156 | if ( $par == 'signup' ) { # Check for [[Special:Userlogin/signup]] |
151 | 157 | $this->mType = 'signup'; |
— | — | @@ -1074,14 +1080,7 @@ |
1075 | 1081 | wfRunHooks( 'UserLoginForm', array( &$template ) ); |
1076 | 1082 | } |
1077 | 1083 | |
1078 | | - // Changes the title depending on permissions for creating account |
1079 | 1084 | $out = $this->getOutput(); |
1080 | | - if ( $user->isAllowed( 'createaccount' ) ) { |
1081 | | - $out->setPageTitle( $this->msg( 'userlogin' ) ); |
1082 | | - } else { |
1083 | | - $out->setPageTitle( $this->msg( 'userloginnocreate' ) ); |
1084 | | - } |
1085 | | - |
1086 | 1085 | $out->disallowUserJs(); // just in case... |
1087 | 1086 | $out->addTemplate( $template ); |
1088 | 1087 | } |