Followup r95753 per CR: prevent extensions from making isMovable() return true for...
[lhc/web/wiklou.git] / includes / CategoryPage.php
index 850256f..bb08cf5 100644 (file)
@@ -143,7 +143,7 @@ class CategoryViewer {
         * @return string HTML output
         */
        public function getHTML() {
-               global $wgOut, $wgCategoryMagicGallery, $wgContLang;
+               global $wgOut, $wgCategoryMagicGallery;
                wfProfileIn( __METHOD__ );
 
                $this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
@@ -172,16 +172,16 @@ class CategoryViewer {
                // Give a proper message if category is empty
                if ( $r == '' ) {
                        $r = wfMsgExt( 'category-empty', array( 'parse' ) );
+               } else {
+                       $pageLang = $this->title->getPageLanguage();
+                       $langAttribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir() );
+                       # close the previous div, show the headings in user language,
+                       # then open a new div with the page content language again
+                       $r = '</div>' . $r . Html::openElement( 'div', $langAttribs );
                }
 
-               $pageLang = $this->title->getPageLanguage();
-               $langAttribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir() );
-               # close the previous div, show the headings in user language,
-               # then open a new div with the page content language again
-               $r = '</div>' . $r . Html::openElement( 'div', $langAttribs );
-
                wfProfileOut( __METHOD__ );
-               return $wgContLang->convert( $r );
+               return $r;
        }
 
        function clearCategoryState() {