Move CSS for patrol from mediawiki.legacy to new module mediawiki.page.patrol
[lhc/web/wiklou.git] / includes / page / Article.php
index eccf36f..f5a860e 100644 (file)
@@ -467,7 +467,7 @@ class Article implements Page {
         * page of the given title.
         */
        public function view() {
-               global $wgUseFileCache, $wgUseETag, $wgDebugToolbar, $wgMaxRedirects;
+               global $wgUseFileCache, $wgDebugToolbar, $wgMaxRedirects;
 
                # Get variables from query string
                # As side effect this will load the revision and update the title
@@ -520,10 +520,6 @@ class Article implements Page {
 
                # Try client and file cache
                if ( !$wgDebugToolbar && $oldid === 0 && $this->mPage->checkTouched() ) {
-                       if ( $wgUseETag ) {
-                               $outputPage->setETag( $parserCache->getETag( $this->mPage, $parserOptions ) );
-                       }
-
                        # Use the greatest of the page's timestamp or the timestamp of any
                        # redirect in the chain (bug 67849)
                        $timestamp = $this->mPage->getTouched();
@@ -1200,6 +1196,7 @@ class Article implements Page {
                $token = $user->getEditToken( $rcid );
 
                $outputPage->preventClickjacking();
+               $outputPage->addModuleStyles( 'mediawiki.page.patrol' );
                if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 'writeapi' ) ) {
                        $outputPage->addModules( 'mediawiki.page.patrol.ajax' );
                }
@@ -1442,14 +1439,13 @@ class Article implements Page {
                        : 'revision-info';
 
                $outputPage = $context->getOutput();
-               $outputPage->addSubtitle( "<div id=\"mw-{$infomsg}\">" .
+               $revisionInfo = "<div id=\"mw-{$infomsg}\">" .
                        $context->msg( $infomsg, $td )
                                ->rawParams( $userlinks )
                                ->params( $revision->getId(), $tddate, $tdtime, $revision->getUserText() )
                                ->rawParams( Linker::revComment( $revision, true, true ) )
                                ->parse() .
-                       "</div>"
-               );
+                       "</div>";
 
                $lnk = $current
                        ? $context->msg( 'currentrevisionlink' )->escaped()
@@ -1521,10 +1517,12 @@ class Article implements Page {
                        $cdel .= ' ';
                }
 
-               $outputPage->addSubtitle( "<div id=\"mw-revision-nav\">" . $cdel .
+               // the outer div is need for styling the revision info and nav in MobileFrontend
+               $outputPage->addSubtitle( "<div class=\"mw-revision\">" . $revisionInfo .
+                       "<div id=\"mw-revision-nav\">" . $cdel .
                        $context->msg( 'revision-nav' )->rawParams(
                                $prevdiff, $prevlink, $lnk, $curdiff, $nextlink, $nextdiff
-                       )->escaped() . "</div>" );
+                       )->escaped() . "</div></div>" );
        }
 
        /**
@@ -2601,8 +2599,8 @@ class Article implements Page {
         * Call to WikiPage function for backwards compatibility.
         * @see WikiPage::updateCategoryCounts
         */
-       public function updateCategoryCounts( array $added, array $deleted ) {
-               return $this->mPage->updateCategoryCounts( $added, $deleted );
+       public function updateCategoryCounts( array $added, array $deleted, $id = 0 ) {
+               return $this->mPage->updateCategoryCounts( $added, $deleted, $id );
        }
 
        /**