r106839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106838‎ | r106839 | r106840 >
Date:19:19, 20 December 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
Revert r75041: adds extra "do what you should always do 100% of the time" checkbox that makes no sense, caused regression on account creation
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuth.i18n.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthHooks.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthPlugin.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthPlugin.php
@@ -250,27 +250,4 @@
251251 return CentralAuthUser::getInstance( $user );
252252 }
253253
254 - /**
255 - * @param $template UserloginTemplate
256 - * @param $type
257 - * @return mixed
258 - */
259 - public function modifyUITemplate( &$template, &$type ) {
260 - global $wgCentralAuthCookies;
261 -
262 - $template->set( 'usedomain', false );
263 -
264 - if ( !$wgCentralAuthCookies ) {
265 - return;
266 - }
267 -
268 - $label = Xml::checkLabel( wfMsg( 'centralauth-login-global' ), 'wpCentralLogin', 'wpCentralLogin', true, array( 'tabindex' => '4' ) );
269 - $field = <<<HTML
270 - <tr id="mw-centralauth-login">
271 - <td></td>
272 - <td class="mw-input">$label</td>
273 - </tr>
274 -HTML;
275 - $template->set( 'extrafields', $field );
276 - }
277254 }
Index: trunk/extensions/CentralAuth/CentralAuthHooks.php
@@ -145,7 +145,7 @@
146146 * @return bool
147147 */
148148 static function onUserLoginComplete( &$user, &$inject_html ) {
149 - global $wgCentralAuthCookies, $wgRequest;
 149+ global $wgCentralAuthCookies;
150150 if ( !$wgCentralAuthCookies ) {
151151 // Use local sessions only.
152152 return true;
@@ -164,14 +164,6 @@
165165 return true;
166166 }
167167
168 - if ( !$wgRequest->getCheck( 'wpCentralLogin' ) && !$wgRequest->getVal( 'wpCreateaccount' ) ) {
169 - // The user requested to log in just on this wiki
170 - // Or they just created an account
171 - // Thankfully, we don't have the awful "Also log me in to other wikis of the Wikimedia Foundation"
172 - // on the registration form too... Though, that would've caused this to not happen
173 - return true;
174 - }
175 -
176168 $inject_html .= '<div class="centralauth-login-box"><p>' .
177169 wfMsgExt( 'centralauth-login-progress', array( 'parsemag' ), $user->getName() ) . "</p>\n<p>";
178170 foreach ( $wgCentralAuthAutoLoginWikis as $alt => $wiki ) {
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php
@@ -35,7 +35,6 @@
3636 'centralauth-merge-step2-detail' => "Some of the accounts could not be automatically matched to the designated home wiki.
3737 If these accounts belong to you, you can confirm that they are yours by providing the password for them.",
3838 'centralauth-merge-step2-submit' => 'Confirm login information',
39 - 'centralauth-login-global' => 'Also log me in to other wikis of {{int:Centralauth-groupname}}',
4039
4140 // Dry run messages
4241 'centralauth-merge-dryrun-complete' => 'All existing accounts can be automatically unified!

Follow-up revisions

RevisionCommit summaryAuthorDate
r106840MFT r106839...reedy19:24, 20 December 2011
r106842MFT r106839...reedy19:27, 20 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75041Add an option option to not perform a global login (bug 20852)....platonides21:17, 19 October 2010

Comments

#Comment by Jeroen De Dauw (talk | contribs)   19:24, 20 December 2011

It only sat there for 30k revs :)

#Comment by Platonides (talk | contribs)   23:22, 20 December 2011

Heh, that's funny. I added it precisely *to avoid getting logged out* by unchecking it at the right times.

Other people have expressed support, as it allows them to use differently named accounts (I know, CentralAuth doesn't want to support them, but such accounts do exist, we could avoid making their life harder).

What regression is it causing?

Sure, it's completely ugly, but the centralauth way to login should be rewritten, so it can get a better place, then.

Status & tagging log