Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -175,8 +175,9 @@ |
176 | 176 | # Save settings (including confirmation token) |
177 | 177 | $u->saveSettings(); |
178 | 178 | |
179 | | - # If not logged in, assume the new account as the current one and set session cookies |
180 | | - # then show a "welcome" message or a "need cookies" message as needed |
| 179 | + # If not logged in, assume the new account as the current one and set |
| 180 | + # session cookies then show a "welcome" message or a "need cookies" |
| 181 | + # message as needed |
181 | 182 | if( $wgUser->isAnon() ) { |
182 | 183 | $wgUser = $u; |
183 | 184 | $wgUser->setCookies(); |
— | — | @@ -216,12 +217,11 @@ |
217 | 218 | return false; |
218 | 219 | } |
219 | 220 | |
220 | | - // If we are not allowing users to login locally, we should |
221 | | - // be checking to see if the user is actually able to |
222 | | - // authenticate to the authentication server before they |
223 | | - // create an account (otherwise, they can create a local account |
224 | | - // and login as any domain user). We only need to check this for |
225 | | - // domains that aren't local. |
| 221 | + // If we are not allowing users to login locally, we should be checking |
| 222 | + // to see if the user is actually able to authenticate to the authenti- |
| 223 | + // cation server before they create an account (otherwise, they can |
| 224 | + // create a local account and login as any domain user). We only need |
| 225 | + // to check this for domains that aren't local. |
226 | 226 | if( 'local' != $this->mDomain && '' != $this->mDomain ) { |
227 | 227 | if( !$wgAuth->canCreateAccounts() && ( !$wgAuth->userExists( $this->mName ) || !$wgAuth->authenticate( $this->mName, $this->mPassword ) ) ) { |
228 | 228 | $this->mainLoginForm( wfMsg( 'wrongpassword' ) ); |
— | — | @@ -281,7 +281,8 @@ |
282 | 282 | } |
283 | 283 | } |
284 | 284 | |
285 | | - # if you need a confirmed email address to edit, then obviously you need an email address. |
| 285 | + # if you need a confirmed email address to edit, then obviously you |
| 286 | + # need an email address. |
286 | 287 | if ( $wgEmailConfirmToEdit && empty( $this->mEmail ) ) { |
287 | 288 | $this->mainLoginForm( wfMsg( 'noemailtitle' ) ); |
288 | 289 | return false; |
— | — | @@ -292,8 +293,8 @@ |
293 | 294 | return false; |
294 | 295 | } |
295 | 296 | |
296 | | - # Set some additional data so the AbortNewAccount hook can be |
297 | | - # used for more than just username validation |
| 297 | + # Set some additional data so the AbortNewAccount hook can be used for |
| 298 | + # more than just username validation |
298 | 299 | $u->setEmail( $this->mEmail ); |
299 | 300 | $u->setRealName( $this->mRealName ); |
300 | 301 | |
— | — | @@ -391,11 +392,12 @@ |
392 | 393 | } |
393 | 394 | } |
394 | 395 | |
395 | | - // Load $wgUser now, and check to see if we're logging in as the same name. |
396 | | - // This is necessary because loading $wgUser (say by calling getName()) calls |
397 | | - // the UserLoadFromSession hook, which potentially creates the user in the |
398 | | - // database. Until we load $wgUser, checking for user existence using |
399 | | - // User::newFromName($name)->getId() below will effectively be using stale data. |
| 396 | + // Load $wgUser now, and check to see if we're logging in as the same |
| 397 | + // name. This is necessary because loading $wgUser (say by calling |
| 398 | + // getName()) calls the UserLoadFromSession hook, which potentially |
| 399 | + // creates the user in the database. Until we load $wgUser, checking |
| 400 | + // for user existence using User::newFromName($name)->getId() below |
| 401 | + // will effectively be using stale data. |
400 | 402 | if ( $wgUser->getName() === $this->mName ) { |
401 | 403 | wfDebug( __METHOD__.": already logged in as {$this->mName}\n" ); |
402 | 404 | return self::SUCCESS; |
— | — | @@ -425,34 +427,30 @@ |
426 | 428 | |
427 | 429 | if (!$u->checkPassword( $this->mPassword )) { |
428 | 430 | if( $u->checkTemporaryPassword( $this->mPassword ) ) { |
429 | | - // The e-mailed temporary password should not be used |
430 | | - // for actual logins; that's a very sloppy habit, |
431 | | - // and insecure if an attacker has a few seconds to |
432 | | - // click "search" on someone's open mail reader. |
| 431 | + // The e-mailed temporary password should not be used for actu- |
| 432 | + // al logins; that's a very sloppy habit, and insecure if an |
| 433 | + // attacker has a few seconds to click "search" on someone's o- |
| 434 | + // pen mail reader. |
433 | 435 | // |
434 | | - // Allow it to be used only to reset the password |
435 | | - // a single time to a new value, which won't be in |
436 | | - // the user's e-mail archives. |
| 436 | + // Allow it to be used only to reset the password a single time |
| 437 | + // to a new value, which won't be in the user's e-mail ar- |
| 438 | + // chives. |
437 | 439 | // |
438 | | - // For backwards compatibility, we'll still recognize |
439 | | - // it at the login form to minimize surprises for |
440 | | - // people who have been logging in with a temporary |
441 | | - // password for some time. |
| 440 | + // For backwards compatibility, we'll still recognize it at the |
| 441 | + // login form to minimize surprises for people who have been |
| 442 | + // logging in with a temporary password for some time. |
442 | 443 | // |
443 | | - // As a side-effect, we can authenticate the user's |
444 | | - // e-mail address if it's not already done, since |
445 | | - // the temporary password was sent via e-mail. |
446 | | - // |
| 444 | + // As a side-effect, we can authenticate the user's e-mail ad- |
| 445 | + // dress if it's not already done, since the temporary password |
| 446 | + // was sent via e-mail. |
447 | 447 | if( !$u->isEmailConfirmed() ) { |
448 | 448 | $u->confirmEmail(); |
449 | 449 | $u->saveSettings(); |
450 | 450 | } |
451 | 451 | |
452 | | - // At this point we just return an appropriate code |
453 | | - // indicating that the UI should show a password |
454 | | - // reset form; bot interfaces etc will probably just |
455 | | - // fail cleanly here. |
456 | | - // |
| 452 | + // At this point we just return an appropriate code/ indicating |
| 453 | + // that the UI should show a password reset form; bot inter- |
| 454 | + // faces etc will probably just fail cleanly here. |
457 | 455 | $retval = self::RESET_PASS; |
458 | 456 | } else { |
459 | 457 | $retval = '' == $this->mPassword ? self::EMPTY_PASS : self::WRONG_PASS; |
— | — | @@ -473,16 +471,16 @@ |
474 | 472 | } |
475 | 473 | |
476 | 474 | /** |
477 | | - * Attempt to automatically create a user on login. |
478 | | - * Only succeeds if there is an external authentication method which allows it. |
| 475 | + * Attempt to automatically create a user on login. Only succeeds if there |
| 476 | + * is an external authentication method which allows it. |
479 | 477 | * @return integer Status code |
480 | 478 | */ |
481 | 479 | function attemptAutoCreate( $user ) { |
482 | 480 | global $wgAuth, $wgUser; |
483 | 481 | /** |
484 | | - * If the external authentication plugin allows it, |
485 | | - * automatically create a new account for users that |
486 | | - * are externally defined but have not yet logged in. |
| 482 | + * If the external authentication plugin allows it, automatically cre- |
| 483 | + * ate a new account for users that are externally defined but have not |
| 484 | + * yet logged in. |
487 | 485 | */ |
488 | 486 | if ( !$wgAuth->autoCreate() ) { |
489 | 487 | return self::NOT_EXISTS; |
— | — | @@ -526,8 +524,8 @@ |
527 | 525 | $wgMemc->delete( $key ); |
528 | 526 | |
529 | 527 | if( $this->hasSessionCookie() || $this->mSkipCookieCheck ) { |
530 | | - /* Replace the language object to provide user interface in correct |
531 | | - * language immediately on this first page load. |
| 528 | + /* Replace the language object to provide user interface in |
| 529 | + * correct language immediately on this first page load. |
532 | 530 | */ |
533 | 531 | global $wgLang, $wgRequest; |
534 | 532 | $code = $wgRequest->getVal( 'uselang', $wgUser->getOption( 'language' ) ); |
— | — | @@ -620,7 +618,8 @@ |
621 | 619 | # Check against password throttle |
622 | 620 | if ( $u->isPasswordReminderThrottled() ) { |
623 | 621 | global $wgPasswordReminderResendTime; |
624 | | - # Round the time in hours to 3 d.p., in case someone is specifying minutes or seconds. |
| 622 | + # Round the time in hours to 3 d.p., in case someone is specifying |
| 623 | + # minutes or seconds. |
625 | 624 | $this->mainLoginForm( wfMsgExt( 'throttled-mailpassword', array( 'parsemag' ), |
626 | 625 | round( $wgPasswordReminderResendTime, 3 ) ) ); |
627 | 626 | return; |
— | — | @@ -741,7 +740,8 @@ |
742 | 741 | $wgOut->setArticleRelated( false ); |
743 | 742 | |
744 | 743 | $wgOut->addWikitext( $wgOut->formatPermissionsErrorMessage( $errors, 'createaccount' ) ); |
745 | | - // Stuff that might want to be added at the end. For example, instructions if blocked. |
| 744 | + // Stuff that might want to be added at the end. For example, instruc- |
| 745 | + // tions if blocked. |
746 | 746 | $wgOut->addWikiMsg( 'cantcreateaccount-nonblock-text' ); |
747 | 747 | |
748 | 748 | $wgOut->returnToMain( false ); |
— | — | @@ -899,9 +899,9 @@ |
900 | 900 | /** |
901 | 901 | * Check if a session cookie is present. |
902 | 902 | * |
903 | | - * This will not pick up a cookie set during _this_ request, but is |
904 | | - * meant to ensure that the client is returning the cookie which was |
905 | | - * set on a previous pass through the system. |
| 903 | + * This will not pick up a cookie set during _this_ request, but is meant |
| 904 | + * to ensure that the client is returning the cookie which was set on a |
| 905 | + * previous pass through the system. |
906 | 906 | * |
907 | 907 | * @private |
908 | 908 | */ |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1101,7 +1101,11 @@ |
1102 | 1102 | 'noarticletextanon' => '{{int:noarticletext}}', # do not translate or duplicate this message to other languages |
1103 | 1103 | 'userpage-userdoesnotexist' => 'User account "$1" is not registered. |
1104 | 1104 | Please check if you want to create/edit this page.', |
1105 | | -'clearyourcache' => "'''Note - After saving, you may have to bypass your browser's cache to see the changes.''' '''Mozilla / Firefox / Safari:''' hold ''Shift'' while clicking ''Reload,'' or press either ''Ctrl-F5'' or ''Ctrl-R'' (''Command-R'' on a Macintosh);'''Konqueror: '''click ''Reload'' or press ''F5;'' '''Opera:''' clear the cache in ''Tools → Preferences;'' '''Internet Explorer:''' hold ''Ctrl'' while clicking ''Refresh,'' or press ''Ctrl-F5.''", |
| 1105 | +'clearyourcache' => "'''Note - After saving, you may have to bypass your browser's cache to see the changes.''' |
| 1106 | +'''Mozilla / Firefox / Safari:''' hold ''Shift'' while clicking ''Reload'', or press either ''Ctrl-F5'' or ''Ctrl-R'' (''Command-R'' on a Macintosh); |
| 1107 | +'''Konqueror: '''click ''Reload'' or press ''F5''; |
| 1108 | +'''Opera:''' clear the cache in ''Tools → Preferences''; |
| 1109 | +'''Internet Explorer:''' hold ''Ctrl'' while clicking ''Refresh,'' or press ''Ctrl-F5''.", |
1106 | 1110 | 'usercssjsyoucanpreview' => "<strong>Tip:</strong> Use the 'Show preview' button to test your new CSS/JS before saving.", |
1107 | 1111 | 'usercsspreview' => "'''Remember that you are only previewing your user CSS.''' |
1108 | 1112 | '''It has not yet been saved!'''", |
— | — | @@ -2160,7 +2164,7 @@ |
2161 | 2165 | 'notanarticle' => 'Not a content page', |
2162 | 2166 | 'notvisiblerev' => 'Revision has been deleted', |
2163 | 2167 | 'watchnochange' => 'None of your watched items were edited in the time period displayed.', |
2164 | | -'watchlist-details' => '{{PLURAL:$1|$1 page|$1 pages}} watched not counting talk pages.', |
| 2168 | +'watchlist-details' => '{{PLURAL:$1|$1 page|$1 pages}} on your watchlist, not counting talk pages.', |
2165 | 2169 | 'wlheader-enotif' => '* E-mail notification is enabled.', |
2166 | 2170 | 'wlheader-showupdated' => "* Pages which have been changed since you last visited them are shown in '''bold'''", |
2167 | 2171 | 'watchmethod-recent' => 'checking recent edits for watched pages', |