$response->header( 'Content-type: ' . $contentType . '; charset=UTF-8' );
# Output may contain user-specific data;
# vary generated content for open sessions on private wikis
- $privateCache = !$wgGroupPermissions['*']['read']
- && ( $smaxage == 0 || session_id() != '' );
+ $privateCache = !$wgGroupPermissions['*']['read'] && ( $smaxage == 0 || session_id() != '' );
# allow the client to cache this for 24 hours
$mode = $privateCache ? 'private' : 'public';
$response->header( 'Cache-Control: ' . $mode . ', s-maxage=' . $smaxage . ', max-age=' . $maxage );
// If it's a MediaWiki message we can just hit the message cache
if ( $request->getBool( 'usemsgcache' ) && $title->getNamespace() == NS_MEDIAWIKI ) {
- $msg = wfMessage( $title->getDBkey() )->inContentLanguage();
+ $key = $title->getDBkey();
+ $msg = wfMessage( $key )->inContentLanguage();
# If the message doesn't exist, return a blank
$text = !$msg->exists() ? '' : $msg->plain();
} else {
$lastmod = wfTimestamp( TS_RFC2822, $rev->getTimestamp() );
$request->response()->header( "Last-modified: $lastmod" );
- $text = $rev->getText( Revision::FOR_THIS_USER, $this->getUser() );
+ // Public-only due to cache headers
+ $text = $rev->getText();
$section = $request->getIntOrNull( 'section' );
if ( $section !== null ) {
$text = $wgParser->getSection( $text, $section );