r99684 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99683‎ | r99684 | r99685 >
Date:14:55, 13 October 2011
Author:junaidpv
Status:ok
Tags:
Comment:
Narayam: Revert r99310 and r99311.
Modified paths:
  • /trunk/extensions/Narayam/Narayam.hooks.php (modified) (history)
  • /trunk/extensions/Narayam/Narayam.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.hooks.php
@@ -53,19 +53,10 @@
5454
5555 /**
5656 * Get the available schemes for the user and content language
57 - * and mandatory schemes for the languages specifed, if any.
5857 * @return array( scheme name => module name )
5958 */
6059 protected static function getSchemes() {
6160 global $wgLanguageCode, $wgLang, $wgNarayamSchemes;
62 - global $wgNarayamAlwaysLoadForLanguages;
63 -
64 - $mandatorySchemes = array ();
65 - foreach ($wgNarayamAlwaysLoadForLanguages as $languageCode) {
66 - if ( isset( $wgNarayamSchemes[$languageCode] ) ) {
67 - $mandatorySchemes += $wgNarayamSchemes[$languageCode];
68 - }
69 - }
7061
7162 $userlangCode = $wgLang->getCode();
7263 $contlangSchemes = isset( $wgNarayamSchemes[$wgLanguageCode] ) ?
@@ -73,7 +64,7 @@
7465 $userlangSchemes = isset( $wgNarayamSchemes[$userlangCode] ) ?
7566 $wgNarayamSchemes[$userlangCode] : array();
7667
77 - return $mandatorySchemes + $userlangSchemes + $contlangSchemes;
 68+ return $userlangSchemes + $contlangSchemes;
7869 }
7970
8071 public static function addPreference( $user, &$preferences ) {
Index: trunk/extensions/Narayam/Narayam.php
@@ -41,9 +41,6 @@
4242 'key' => 'm'
4343 );
4444
45 -// Schemes for the languages specified in this arrays will be loaded always
46 -$wgNarayamAlwaysLoadForLanguages = array();
47 -
4845 // Array mapping language codes and scheme names to module names
4946 // Custom schemes can be added here
5047 $wgNarayamSchemes = array(

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99310Narayam: Some wiki may need to load schemes for certain languages always load...junaidpv13:54, 8 October 2011
r99311Narayam: Handle unavailable languages. Fix r99310.junaidpv14:04, 8 October 2011

Status & tagging log