Revision: 43642
Author: harddisk
Date: 2008-11-17 21:49:29 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
Added $wgLoginAutocomplete to let wiki owner disable password autocompletion in
Special:Userlogin by setting it to false. Defaults to true.
Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/DefaultSettings.php
trunk/phase3/includes/specials/SpecialUserlogin.php
trunk/phase3/includes/templates/Userlogin.php
Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES 2008-11-17 21:37:27 UTC (rev 43641)
+++ trunk/phase3/RELEASE-NOTES 2008-11-17 21:49:29 UTC (rev 43642)
@@ -63,6 +63,8 @@
* 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:
Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php 2008-11-17 21:37:27 UTC (rev
43641)
+++ trunk/phase3/includes/DefaultSettings.php 2008-11-17 21:49:29 UTC (rev
43642)
@@ -484,6 +484,12 @@
$wgPasswordSender = 'MediaWiki Mail <apache@' . $wgServerName . '>';
/**
+ * 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
* to the $wgEmergencyContact address
Modified: trunk/phase3/includes/specials/SpecialUserlogin.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUserlogin.php 2008-11-17 21:37:27 UTC
(rev 43641)
+++ trunk/phase3/includes/specials/SpecialUserlogin.php 2008-11-17 21:49:29 UTC
(rev 43642)
@@ -791,6 +791,7 @@
global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail;
global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector;
global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration;
+ global $wgLoginAutocomplete;
$titleObj = SpecialPage::getTitleFor( 'Userlogin' );
@@ -870,7 +871,8 @@
$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() );
Modified: trunk/phase3/includes/templates/Userlogin.php
===================================================================
--- trunk/phase3/includes/templates/Userlogin.php 2008-11-17 21:37:27 UTC
(rev 43641)
+++ trunk/phase3/includes/templates/Userlogin.php 2008-11-17 21:49:29 UTC
(rev 43642)
@@ -25,7 +25,7 @@
<div id="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div>
<div id="userloginForm">
-<form name="userlogin" method="post" action="<?php $this->text('action') ?>">
+<form name="userlogin" method="post" action="<?php $this->text('action') ?>"
<?PHP if( !$this->data['autocomplete'] ) echo 'autocomplete="off"'; ?>>
<h2><?php $this->msg('login') ?></h2>
<p id="userloginlink"><?php $this->html('link') ?></p>
<?php $this->html('header'); /* pre-table point for form plugins... */
?>
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs