Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -484,6 +484,12 @@ |
485 | 485 | $wgPasswordSender = 'MediaWiki Mail <apache@' . $wgServerName . '>'; |
486 | 486 | |
487 | 487 | /** |
| 488 | + * Determines if password autocompletion should be enabled in Special:Userlogin |
| 489 | + * Defaults to true. If false, autocomplete="off" will be injected in the form tag. |
| 490 | + */ |
| 491 | +$wgLoginAutocomplete = true; |
| 492 | + |
| 493 | +/** |
488 | 494 | * dummy address which should be accepted during mail send action |
489 | 495 | * It might be necessay to adapt the address or to set it equal |
490 | 496 | * to the $wgEmergencyContact address |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -791,6 +791,7 @@ |
792 | 792 | global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail; |
793 | 793 | global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector; |
794 | 794 | global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration; |
| 795 | + global $wgLoginAutocomplete; |
795 | 796 | |
796 | 797 | $titleObj = SpecialPage::getTitleFor( 'Userlogin' ); |
797 | 798 | |
— | — | @@ -870,7 +871,8 @@ |
871 | 872 | $template->set( 'canreset', $wgAuth->allowPasswordChange() ); |
872 | 873 | $template->set( 'canremember', ( $wgCookieExpiration > 0 ) ); |
873 | 874 | $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember ); |
874 | | - |
| 875 | + $template->set( 'autocomplete', $wgLoginAutocomplete ); |
| 876 | + |
875 | 877 | # Prepare language selection links as needed |
876 | 878 | if( $wgLoginLanguageSelector ) { |
877 | 879 | $template->set( 'languages', $this->makeLanguageSelector() ); |
Index: trunk/phase3/includes/templates/Userlogin.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | |
27 | 27 | <div id="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div> |
28 | 28 | <div id="userloginForm"> |
29 | | -<form name="userlogin" method="post" action="<?php $this->text('action') ?>"> |
| 29 | +<form name="userlogin" method="post" action="<?php $this->text('action') ?>" <?PHP if( !$this->data['autocomplete'] ) echo 'autocomplete="off"'; ?>> |
30 | 30 | <h2><?php $this->msg('login') ?></h2> |
31 | 31 | <p id="userloginlink"><?php $this->html('link') ?></p> |
32 | 32 | <?php $this->html('header'); /* pre-table point for form plugins... */ ?> |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -63,6 +63,8 @@ |
64 | 64 | * Image namespace and accompanying talk namespace renamed to File. For backward |
65 | 65 | compatibility purposes, Image still works. External tools may need to be |
66 | 66 | updated. |
| 67 | +* Added $wgLoginAutocomplete to let wiki owner disable password autocompletion |
| 68 | + in Special:Userlogin by setting it to false. Defaults to true. |
67 | 69 | |
68 | 70 | === Migrated extensions === |
69 | 71 | The following extensions are migrated into MediaWiki 1.14: |