r79489 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79488‎ | r79489 | r79490 >
Date:14:08, 2 January 2011
Author:ialex
Status:deferred
Tags:
Comment:
Pass the Title to onCategoryPageView_buildSortkeySelectForm() instead of grabbing it from $wgArticle
Modified paths:
  • /trunk/extensions/CategoryMultisort/CategoryMultisort.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryMultisort/CategoryMultisort.hooks.php
@@ -368,7 +368,7 @@
369369 }
370370 }
371371
372 - $wgOut->addHTML( $this->onCategoryPageView_buildSortkeySelectForm( $skn ) );
 372+ $wgOut->addHTML( $this->onCategoryPageView_buildSortkeySelectForm( $skn, $title ) );
373373
374374 if ( !$skn || !array_key_exists( $skn, $wgCategoryMultisortSortkeySettings ) ) {
375375 return true;
@@ -386,8 +386,8 @@
387387 }
388388 }
389389
390 - function onCategoryPageView_buildSortkeySelectForm( $current = '' ) {
391 - global $wgCategoryMultisortSortkeySettings, $wgArticle, $wgScript, $wgContLang;
 390+ function onCategoryPageView_buildSortkeySelectForm( $current, $title ) {
 391+ global $wgCategoryMultisortSortkeySettings, $wgScript, $wgContLang;
392392
393393 $html = '';
394394
@@ -415,7 +415,7 @@
416416 Html::input( '', wfMsgNoTrans( 'categorymultisort-go' ), 'submit' , array(
417417 'id' => 'categorymultisort-select-go',
418418 ) ) );
419 - $html = Html::hidden( 'title', $wgArticle->getTitle()->getPrefixedDBkey() ) . $html;
 419+ $html = Html::hidden( 'title', $title->getPrefixedDBkey() ) . $html;
420420 $html = Html::rawElement( 'form', array(
421421 'action' => $wgScript,
422422 'method' => 'get',

Status & tagging log