protected $mStatusCode;
/**
- * @var string Variable mLastModified and mEtag are used for sending cache control.
+ * @var string Used for sending cache control.
* The whole caching system should probably be moved into its own class.
*/
protected $mLastModified = '';
- /**
- * Contains an HTTP Entity Tags (see RFC 2616 section 3.13) which is used
- * as a unique identifier for the content. It is later used by the client
- * to compare its cached version with the server version. Client sends
- * headers If-Match and If-None-Match containing its locally cached ETAG value.
- *
- * To get more information, you will have to look at HTTP/1.1 protocol which
- * is properly described in RFC 2616 : http://tools.ietf.org/html/rfc2616
- */
- private $mETag = false;
-
/** @var array */
protected $mCategoryLinks = [];
}
/**
- * Set the value of the ETag HTTP header, only used if $wgUseETag is true
- *
- * @param string $tag Value of "ETag" header
+ * @deprecated since 1.28 Obsolete - wgUseETag experiment was removed.
+ * @param string $tag
*/
- function setETag( $tag ) {
- $this->mETag = $tag;
+ public function setETag( $tag ) {
}
/**
# Fetch existence plus the hiddencat property
$dbr = wfGetDB( DB_SLAVE );
- $fields = [ 'page_id', 'page_namespace', 'page_title', 'page_len',
- 'page_is_redirect', 'page_latest', 'pp_value' ];
-
- if ( $this->getConfig()->get( 'ContentHandlerUseDB' ) ) {
- $fields[] = 'page_content_model';
- }
- if ( $this->getConfig()->get( 'PageLanguageUseDB' ) ) {
- $fields[] = 'page_lang';
- }
+ $fields = array_merge(
+ LinkCache::getSelectFields(),
+ [ 'page_namespace', 'page_title', 'pp_value' ]
+ );
$res = $dbr->select( [ 'page', 'page_props' ],
$fields,
public function sendCacheControl() {
$response = $this->getRequest()->response();
$config = $this->getConfig();
- if ( $config->get( 'UseETag' ) && $this->mETag ) {
- $response->header( "ETag: $this->mETag" );
- }
$this->addVaryHeader( 'Cookie' );
$this->addAcceptLanguage();
$links[] = $this->makeResourceLoaderLink( 'user', ResourceLoaderModule::TYPE_COMBINED );
}
- // Group JS is only enabled if site JS is enabled.
- $links[] = $this->makeResourceLoaderLink(
- 'user.groups',
- ResourceLoaderModule::TYPE_COMBINED
- );
-
return self::getHtmlFromLoaderLinks( $links );
}
$moduleStyles = $this->getModuleStyles();
// Per-site custom styles
- $moduleStyles[] = 'site';
+ $moduleStyles[] = 'site.styles';
$moduleStyles[] = 'noscript';
- $moduleStyles[] = 'user.groups';
// Per-user custom styles
if ( $this->getConfig()->get( 'AllowUserCss' ) && $this->getTitle()->isCssSubpage()
if ( !$module ) {
continue;
}
- if ( $name === 'site' ) {
+ if ( $name === 'site.styles' ) {
// HACK: The site module shouldn't be fragmented with a cache group and
// http request. But in order to ensure its styles are separated and after the
// ResourceLoaderDynamicStyles marker, pretend it is in a group called 'site'.