mediawiki.checkboxtoggle: Fix minor issues.
[lhc/web/wiklou.git] / includes / OutputPage.php
index 67e9a4f..ad7c976 100644 (file)
@@ -1277,15 +1277,10 @@ class OutputPage extends ContextSource {
 
                # 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,
@@ -2026,6 +2021,11 @@ class OutputPage extends ContextSource {
         * @return string
         */
        public function getVaryHeader() {
+               // If we vary on cookies, let's make sure it's always included here too.
+               if ( $this->getCacheVaryCookies() ) {
+                       $this->addVaryHeader( 'Cookie' );
+               }
+
                foreach ( SessionManager::singleton()->getVaryHeaders() as $header => $options ) {
                        $this->addVaryHeader( $header, $options );
                }
@@ -3096,12 +3096,6 @@ class OutputPage extends ContextSource {
                        $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 );
        }
 
@@ -3667,7 +3661,6 @@ class OutputPage extends ContextSource {
                // Per-site custom styles
                $moduleStyles[] = 'site';
                $moduleStyles[] = 'noscript';
-               $moduleStyles[] = 'user.groups';
 
                // Per-user custom styles
                if ( $this->getConfig()->get( 'AllowUserCss' ) && $this->getTitle()->isCssSubpage()