Index: branches/REL1_18/phase3/includes/CategoryPage.php |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | * @return string HTML output |
145 | 145 | */ |
146 | 146 | public function getHTML() { |
147 | | - global $wgOut, $wgCategoryMagicGallery, $wgContLang; |
| 147 | + global $wgOut, $wgCategoryMagicGallery, $wgLang, $wgContLang; |
148 | 148 | wfProfileIn( __METHOD__ ); |
149 | 149 | |
150 | 150 | $this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery; |
— | — | @@ -172,14 +172,14 @@ |
173 | 173 | // Give a proper message if category is empty |
174 | 174 | if ( $r == '' ) { |
175 | 175 | $r = wfMsgExt( 'category-empty', array( 'parse' ) ); |
176 | | - } else { |
177 | | - $pageLang = $this->title->getPageLanguage(); |
178 | | - $langAttribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir() ); |
179 | | - # close the previous div, show the headings in user language, |
180 | | - # then open a new div with the page content language again |
181 | | - $r = '</div>' . $r . Html::openElement( 'div', $langAttribs ); |
182 | 176 | } |
183 | 177 | |
| 178 | + $pageLang = $this->title->getPageLanguage(); |
| 179 | + $langAttribs = array( 'lang' => $wgLang->getCode(), 'dir' => $wgLang->getDir() ); |
| 180 | + # close the previous div, show the headings in user language, |
| 181 | + # then open a new div with the page content language again |
| 182 | + $r = Html::openElement( 'div', $langAttribs ) . $r . '</div>'; |
| 183 | + |
184 | 184 | wfProfileOut( __METHOD__ ); |
185 | 185 | return $wgContLang->convert( $r ); |
186 | 186 | } |