r91176 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91175‎ | r91176 | r91177 >
Date:15:18, 30 June 2011
Author:robin
Status:ok
Tags:
Comment:
Change code as in TablePager (fixes arrow direction with wgBetterDirectionality = true)
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -546,7 +546,7 @@
547547 * Stolen from TablePager because it's pretty.
548548 */
549549 function getNavigationBar() {
550 - global $wgStylePath, $wgContLang;
 550+ global $wgStylePath;
551551
552552 if ( method_exists( $this, 'isNavigationBarShown' ) &&
553553 !$this->isNavigationBarShown() )
@@ -560,17 +560,22 @@
561561 'last' => 'table_pager_last',
562562 );
563563 $images = array(
564 - 'first' => $wgContLang->isRTL() ? 'arrow_last_25.png' : 'arrow_first_25.png',
565 - 'prev' => $wgContLang->isRTL() ? 'arrow_right_25.png' : 'arrow_left_25.png',
566 - 'next' => $wgContLang->isRTL() ? 'arrow_left_25.png' : 'arrow_right_25.png',
567 - 'last' => $wgContLang->isRTL() ? 'arrow_first_25.png' : 'arrow_last_25.png',
 564+ 'first' => 'arrow_first_25.png',
 565+ 'prev' => 'arrow_left_25.png',
 566+ 'next' => 'arrow_right_25.png',
 567+ 'last' => 'arrow_last_25.png',
568568 );
569569 $disabledImages = array(
570 - 'first' => $wgContLang->isRTL() ? 'arrow_disabled_last_25.png' : 'arrow_disabled_first_25.png',
571 - 'prev' => $wgContLang->isRTL() ? 'arrow_disabled_right_25.png' : 'arrow_disabled_left_25.png',
572 - 'next' => $wgContLang->isRTL() ? 'arrow_disabled_left_25.png' : 'arrow_disabled_right_25.png',
573 - 'last' => $wgContLang->isRTL() ? 'arrow_disabled_first_25.png' : 'arrow_disabled_last_25.png',
 570+ 'first' => 'arrow_disabled_first_25.png',
 571+ 'prev' => 'arrow_disabled_left_25.png',
 572+ 'next' => 'arrow_disabled_right_25.png',
 573+ 'last' => 'arrow_disabled_last_25.png',
574574 );
 575+ if( wfUILang()->isRTL() ) {
 576+ $keys = array_keys( $labels );
 577+ $images = array_combine( $keys, array_reverse( $images ) );
 578+ $disabledImages = array_combine( $keys, array_reverse( $disabledImages ) );
 579+ }
575580
576581 $linkTexts = array();
577582 $disabledTexts = array();

Status & tagging log