r99356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99355‎ | r99356 | r99357 >
Date:16:04, 9 October 2011
Author:johnduhart
Status:ok
Tags:
Comment:
Followup r99354, update extensions that use CategoryViewer to be compatiable with the new arguments
Modified paths:
  • /trunk/extensions/CategoryBrowser/CategoryBrowserView.php (modified) (history)
  • /trunk/extensions/CategoryMultisort/CategoryMultisort.class.php (modified) (history)
  • /trunk/extensions/CategoryMultisort/CategoryMultisort.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryBrowser/CategoryBrowserView.php
@@ -146,7 +146,8 @@
147147 $result = '';
148148 if ( !empty( $pager_row->cl_sortkey ) &&
149149 $title_obj->getText() != $pager_row->cl_sortkey ) {
150 - $cv = new CategoryViewer( $title_obj );
 150+ // TODO: Get better context
 151+ $cv = new CategoryViewer( $title_obj, RequestContext::getMain() );
151152 $this->sortkey_hint = '(' . $cv->getSubcategorySortChar( $title_obj, $pager_row->cl_sortkey ) . ')';
152153 $result = CB_XML::toText( $this->sortkey_hint_tpl );
153154 }
Index: trunk/extensions/CategoryMultisort/CategoryMultisort.hooks.php
@@ -378,7 +378,10 @@
379379
380380 $from = $wgRequest->getVal( 'from' );
381381 $until = $wgRequest->getVal( 'until' );
382 - $viewer = new CategoryMultisortViewer( $title, $skn, $from, $until );
 382+ $viewer = new CategoryMultisortViewer(
 383+ $title, $categoryArticle->getContext(), $skn,
 384+ $from, $until
 385+ );
383386 $wgOut->addHTML( $viewer->getHTML() );
384387
385388 return false;
Index: trunk/extensions/CategoryMultisort/CategoryMultisort.class.php
@@ -6,9 +6,9 @@
77
88 class CategoryMultisortViewer extends CategoryViewer {
99
10 - function __construct( $title, $skn, $from = '', $until = '' ) {
 10+ function __construct( $title, IContextSource $context, $skn, $from = '', $until = '' ) {
1111 global $wgCategoryMultisortSortkeySettings;
12 - parent::__construct( $title, $from, $until );
 12+ parent::__construct( $title, $context, $from, $until );
1313 $this->sortkeyName = $skn;
1414 $this->sortkeySettings = $wgCategoryMultisortSortkeySettings[$skn];
1515 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99354CategoryViewer now requires a Contextjohnduhart16:00, 9 October 2011

Status & tagging log