r39609 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39608‎ | r39609 | r39610 >
Date:20:27, 18 August 2008
Author:demon
Status:old
Tags:
Comment:
Remove last of $wgEnablePersistentCookies. Use > 0 checks on $wgCookieExpiration instead. Also typo in my docs.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -1471,7 +1471,7 @@
14721472 $wgShowUpdatedMarker = true;
14731473
14741474 /**
1475 - * Default cookie expiration time. Setting to 0 disables makes all cookies session-only.
 1475+ * Default cookie expiration time. Setting to 0 makes all cookies session-only.
14761476 */
14771477 $wgCookieExpiration = 30*86400;
14781478
Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -517,7 +517,7 @@
518518 global $wgEnotifWatchlist, $wgEnotifUserTalk,$wgEnotifMinorEdits;
519519 global $wgRCShowWatchingUsers, $wgEnotifRevealEditorAddress;
520520 global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication;
521 - global $wgContLanguageCode, $wgDefaultSkin, $wgEnablePersistentCookies;
 521+ global $wgContLanguageCode, $wgDefaultSkin, $wgCookieExpiration;
522522 global $wgEmailConfirmToEdit, $wgAjaxSearch, $wgEnableMWSuggest;
523523
524524 $wgOut->setPageTitle( wfMsg( 'preferences' ) );
@@ -764,7 +764,7 @@
765765 Xml::password( 'wpRetypePass', 25, $this->mRetypePass, array( 'id' => 'wpRetypePass' ) )
766766 )
767767 );
768 - if( $wgEnablePersistentCookies ){
 768+ if( $wgCookieExpiration > 0 ){
769769 $wgOut->addHTML(
770770 Xml::tags( 'tr', null,
771771 Xml::tags( 'td', array( 'colspan' => '2' ),
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -738,7 +738,7 @@
739739 function mainLoginForm( $msg, $msgtype = 'error' ) {
740740 global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail;
741741 global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector;
742 - global $wgAuth, $wgEmailConfirmToEdit, $wgEnablePersistentCookies;
 742+ global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration;
743743
744744 $titleObj = SpecialPage::getTitleFor( 'Userlogin' );
745745
@@ -816,7 +816,7 @@
817817 $template->set( 'useemail', $wgEnableEmail );
818818 $template->set( 'emailrequired', $wgEmailConfirmToEdit );
819819 $template->set( 'canreset', $wgAuth->allowPasswordChange() );
820 - $template->set( 'canremember', $wgEnablePersistentCookies );
 820+ $template->set( 'canremember', ( $wgCookieExpiration > 0 ) );
821821 $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember );
822822
823823 # Prepare language selection links as needed

Status & tagging log