Remove last of $wgEnablePersistentCookies. Use > 0 checks on $wgCookieExpiration...
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 18 Aug 2008 20:27:05 +0000 (20:27 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 18 Aug 2008 20:27:05 +0000 (20:27 +0000)
includes/DefaultSettings.php
includes/specials/SpecialPreferences.php
includes/specials/SpecialUserlogin.php

index 020c1af..fca0d7b 100644 (file)
@@ -1471,7 +1471,7 @@ $wgRCChangedSizeThreshold                 = -500;
 $wgShowUpdatedMarker                           = true;
 
 /**
- * Default cookie expiration time. Setting to 0 disables makes all cookies session-only.
+ * Default cookie expiration time. Setting to 0 makes all cookies session-only.
  */
 $wgCookieExpiration = 30*86400;
 
index e30a4ec..1b00bed 100644 (file)
@@ -517,7 +517,7 @@ class PreferencesForm {
                global $wgEnotifWatchlist, $wgEnotifUserTalk,$wgEnotifMinorEdits;
                global $wgRCShowWatchingUsers, $wgEnotifRevealEditorAddress;
                global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication;
-               global $wgContLanguageCode, $wgDefaultSkin, $wgEnablePersistentCookies;
+               global $wgContLanguageCode, $wgDefaultSkin, $wgCookieExpiration;
                global $wgEmailConfirmToEdit, $wgAjaxSearch, $wgEnableMWSuggest;
 
                $wgOut->setPageTitle( wfMsg( 'preferences' ) );
@@ -764,7 +764,7 @@ class PreferencesForm {
                                        Xml::password( 'wpRetypePass', 25, $this->mRetypePass, array( 'id' => 'wpRetypePass' ) )
                                )
                        );
-                       if( $wgEnablePersistentCookies ){
+                       if( $wgCookieExpiration > 0 ){
                                $wgOut->addHTML(
                                        Xml::tags( 'tr', null,
                                                Xml::tags( 'td', array( 'colspan' => '2' ),
index b9557ef..00c93d6 100644 (file)
@@ -738,7 +738,7 @@ class LoginForm {
        function mainLoginForm( $msg, $msgtype = 'error' ) {
                global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail;
                global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector;
-               global $wgAuth, $wgEmailConfirmToEdit, $wgEnablePersistentCookies;
+               global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration;
                
                $titleObj = SpecialPage::getTitleFor( 'Userlogin' );
                
@@ -816,7 +816,7 @@ class LoginForm {
                $template->set( 'useemail', $wgEnableEmail );
                $template->set( 'emailrequired', $wgEmailConfirmToEdit );
                $template->set( 'canreset', $wgAuth->allowPasswordChange() );
-               $template->set( 'canremember', $wgEnablePersistentCookies );
+               $template->set( 'canremember', ( $wgCookieExpiration > 0 ) );
                $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember  );
 
                # Prepare language selection links as needed