From: Marco Schuster Date: Mon, 17 Nov 2008 21:49:29 +0000 (+0000) Subject: Added $wgLoginAutocomplete to let wiki owner disable password autocompletion in Speci... X-Git-Tag: 1.31.0-rc.0~44298 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=8f55d6ebc1c9d5e3f2a262d1a32782933941b7b5;p=lhc%2Fweb%2Fwiklou.git Added $wgLoginAutocomplete to let wiki owner disable password autocompletion in Special:Userlogin by setting it to false. Defaults to true. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a77862b78c..61815a5275 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -63,6 +63,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Image namespace and accompanying talk namespace renamed to File. For backward compatibility purposes, Image still works. External tools may need to be updated. +* Added $wgLoginAutocomplete to let wiki owner disable password autocompletion + in Special:Userlogin by setting it to false. Defaults to true. === Migrated extensions === The following extensions are migrated into MediaWiki 1.14: diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 32c04fc308..2dae182847 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -483,6 +483,12 @@ $wgEmergencyContact = 'wikiadmin@' . $wgServerName; */ $wgPasswordSender = 'MediaWiki Mail '; +/** + * Determines if password autocompletion should be enabled in Special:Userlogin + * Defaults to true. If false, autocomplete="off" will be injected in the form tag. + */ +$wgLoginAutocomplete = true; + /** * dummy address which should be accepted during mail send action * It might be necessay to adapt the address or to set it equal diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index e26df312b4..e4baf5c8f6 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -791,6 +791,7 @@ class LoginForm { global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail; global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector; global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration; + global $wgLoginAutocomplete; $titleObj = SpecialPage::getTitleFor( 'Userlogin' ); @@ -870,7 +871,8 @@ class LoginForm { $template->set( 'canreset', $wgAuth->allowPasswordChange() ); $template->set( 'canremember', ( $wgCookieExpiration > 0 ) ); $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember ); - + $template->set( 'autocomplete', $wgLoginAutocomplete ); + # Prepare language selection links as needed if( $wgLoginLanguageSelector ) { $template->set( 'languages', $this->makeLanguageSelector() ); diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index c4a60b6cbe..c11399fced 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -25,7 +25,7 @@ class UserloginTemplate extends QuickTemplate {
msgWiki( 'loginstart' ); ?>
-
+data['autocomplete'] ) echo 'autocomplete="off"'; ?>>

msg('login') ?>

html('header'); /* pre-table point for form plugins... */ ?>