r96888 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96887‎ | r96888 | r96889 >
Date:19:25, 12 September 2011
Author:brion
Status:ok
Tags:
Comment:
MFT r96886: backport to fix bug 30865 on 1.18
Followup to r91518 and friends.
Modified paths:
  • /branches/REL1_18/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/CategoryPage.php
@@ -143,7 +143,7 @@
144144 * @return string HTML output
145145 */
146146 public function getHTML() {
147 - global $wgOut, $wgCategoryMagicGallery, $wgContLang;
 147+ global $wgOut, $wgCategoryMagicGallery, $wgLang, $wgContLang;
148148 wfProfileIn( __METHOD__ );
149149
150150 $this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
@@ -172,14 +172,14 @@
173173 // Give a proper message if category is empty
174174 if ( $r == '' ) {
175175 $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 );
182176 }
183177
 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+
184184 wfProfileOut( __METHOD__ );
185185 return $wgContLang->convert( $r );
186186 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r96894Remove unused variable and update code comment per r96888.robin20:08, 12 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91518(bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionali...robin02:26, 6 July 2011
r96886* (bug 30865) Fix regression breaking category pages when there's no local pa...brion19:09, 12 September 2011

Status & tagging log