Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/231491
Change subject: User getExtendedLoginCookieExpiration from core
......................................................................
User getExtendedLoginCookieExpiration from core
Use the new core method to avoid repeating this logic.
Change-Id: Iea489b7767a57d6fa5e08fbfadf86164754bcece
Depends: I7bf17536938930ae2a2c4d2d419f7e002a49ab5a
---
M includes/CentralAuthUser.php
1 file changed, 2 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/91/231491/1
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 0b73807..153f941 100755
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -2316,7 +2316,7 @@
*/
static function setCookie( $name, $value, $exp = -1, $secure = null,
$prefix = false ) {
global $wgCentralAuthCookiePrefix, $wgCentralAuthCookieDomain,
- $wgCookieExpiration, $wgCentralAuthCookiePath,
$wgExtendedLoginCookieExpiration;
+ $wgCentralAuthCookiePath;
if ( CentralAuthHooks::hasApiToken() ) {
throw new Exception( "Cannot set cookies when API
'centralauthtoken' parameter is given" );
@@ -2325,13 +2325,7 @@
self::setP3P();
if ( $exp == -1 ) {
- $exp = time();
-
- if ( $wgExtendedLoginCookieExpiration !== null ) {
- $exp += $wgExtendedLoginCookieExpiration;
- } else {
- $exp += $wgCookieExpiration;
- }
+ $exp = time() +
User::getExtendedLoginCookieExpiration();
} elseif ( $exp == 0 ) {
// Session cookie
$exp = null;
--
To view, visit https://gerrit.wikimedia.org/r/231491
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea489b7767a57d6fa5e08fbfadf86164754bcece
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits