X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FRawAction.php;h=69cd7aa1bd1ea5b893db252452c91fb59ad5e388;hb=4dc3ac1c375b3d2eb6172dfef8fdebe71b8c5f43;hp=b371848e7bd634b746832caeca84837c8427f68e;hpb=84022083410088f9ed00433485a4b076fec79ab8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index b371848e7b..69cd7aa1bd 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -83,8 +83,7 @@ class RawAction extends FormlessAction { $response->header( 'Content-type: ' . $contentType . '; charset=UTF-8' ); // Output may contain user-specific data; // vary generated content for open sessions on private wikis - $privateCache = !User::isEveryoneAllowed( 'read' ) && - ( $smaxage == 0 || MediaWiki\Session\SessionManager::getGlobalSession()->isPersistent() ); + $privateCache = !User::isEveryoneAllowed( 'read' ) && ( $smaxage == 0 || session_id() != '' ); // Don't accidentally cache cookies if user is logged in (T55032) $privateCache = $privateCache || $this->getUser()->isLoggedIn(); $mode = $privateCache ? 'private' : 'public';