From 4c5fa191fd05fdd69b31f24fd6572ef09c8eb087 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 18 Aug 2008 20:27:05 +0000 Subject: [PATCH] Remove last of $wgEnablePersistentCookies. Use > 0 checks on $wgCookieExpiration instead. Also typo in my docs. --- includes/DefaultSettings.php | 2 +- includes/specials/SpecialPreferences.php | 4 ++-- includes/specials/SpecialUserlogin.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 020c1afa3d..fca0d7b9ca 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index e30a4ec46e..1b00bed24d 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -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' ), diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index b9557ef71c..00c93d6513 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -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 -- 2.20.1