r104222 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104221‎ | r104222 | r104223 >
Date:05:27, 25 November 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Partial revert of r103815 which destroyed some previous changes
Modified paths:
  • /trunk/extensions/Narayam/Narayam.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.hooks.php
@@ -50,15 +50,18 @@
5151 * @return array( scheme name => module name )
5252 */
5353 protected static function getSchemes() {
54 - global $wgLanguageCode, $wgLang, $wgNarayamSchemes, $wgRequest;
 54+ global $wgLanguageCode, $wgLang, $wgNarayamSchemes, $wgTitle;
5555
5656 $userlangCode = $wgLang->getCode();
5757 $contlangSchemes = isset( $wgNarayamSchemes[$wgLanguageCode] ) ?
5858 $wgNarayamSchemes[$wgLanguageCode] : array();
5959 $userlangSchemes = isset( $wgNarayamSchemes[$userlangCode] ) ?
6060 $wgNarayamSchemes[$userlangCode] : array();
 61+ $pagelang = $wgTitle->getPageLanguage()->getCode();
 62+ $pagelangSchemes = isset( $wgNarayamSchemes[$pagelang] ) ?
 63+ $wgNarayamSchemes[$pagelang] : array();
6164
62 - $schemes = $userlangSchemes + $contlangSchemes;
 65+ $schemes = $userlangSchemes + $contlangSchemes + $pagelangSchemes;
6366
6467 return $schemes;
6568 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103815Fixed typo, indentation and moved constant to configsnikerabbit15:36, 21 November 2011

Status & tagging log