dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SessionManager: Kill getPersistedSessionId()
[lhc/web/wiklou.git]
/
includes
/
WebRequest.php
diff --git
a/includes/WebRequest.php
b/includes/WebRequest.php
index
7306105
..
4c4ca97
100644
(file)
--- a/
includes/WebRequest.php
+++ b/
includes/WebRequest.php
@@
-655,7
+655,10
@@
class WebRequest {
*/
public function getSession() {
if ( $this->sessionId !== null ) {
*/
public function getSession() {
if ( $this->sessionId !== null ) {
- return SessionManager::singleton()->getSessionById( (string)$this->sessionId, false, $this );
+ $session = SessionManager::singleton()->getSessionById( (string)$this->sessionId, true, $this );
+ if ( $session ) {
+ return $session;
+ }
}
$session = SessionManager::singleton()->getSessionForRequest( $this );
}
$session = SessionManager::singleton()->getSessionForRequest( $this );
@@
-683,8
+686,10
@@
class WebRequest {
* @return bool
*/
public function checkSessionCookie() {
* @return bool
*/
public function checkSessionCookie() {
+ global $wgInitialSessionId;
wfDeprecated( __METHOD__, '1.27' );
wfDeprecated( __METHOD__, '1.27' );
- return SessionManager::singleton()->getPersistedSessionId( $this ) !== null;
+ return $wgInitialSessionId !== null &&
+ $this->getSession()->getId() === (string)$wgInitialSessionId;
}
/**
}
/**