Fix merge artifact in Article::showCssOrJsPage.
authordaniel <daniel.kinzler@wikimedia.de>
Tue, 9 Oct 2012 12:23:42 +0000 (14:23 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Tue, 9 Oct 2012 12:23:42 +0000 (14:23 +0200)
Change-Id: I1e9608809b81d2c5feeb048ddee96d5324b62a81

includes/Article.php

index ee96338..7367812 100644 (file)
@@ -832,19 +832,20 @@ class Article extends Page {
         * @param bool $showCacheHint whether to show a message telling the user to clear the browser cache (default: true).
         */
        protected function showCssOrJsPage( $showCacheHint = true ) {
+               $outputPage = $this->getContext()->getOutput();
+
                if ( $showCacheHint ) {
                        $dir = $this->getContext()->getLanguage()->getDir();
                        $lang = $this->getContext()->getLanguage()->getCode();
 
-                       $outputPage = $this->getContext()->getOutput();
                        $outputPage->wrapWikiMsg( "<div id='mw-clearyourcache' lang='$lang' dir='$dir' class='mw-content-$dir'>\n$1\n</div>",
                                'clearyourcache' );
                }
 
                // Give hooks a chance to customise the output
-               if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', array( $this->fetchContentObject(), $this->getTitle(), $wgOut ) ) ) {
+               if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', array( $this->fetchContentObject(), $this->getTitle(), $outputPage ) ) ) {
                        $po = $this->mContentObject->getParserOutput( $this->getTitle() );
-                       $wgOut->addHTML( $po->getText() );
+                       $outputPage->addHTML( $po->getText() );
                }
        }