Index: trunk/extensions/Narayam/Narayam.hooks.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | * @return array( scheme name => module name ) |
58 | 58 | */ |
59 | 59 | protected static function getSchemes() { |
60 | | - global $wgLanguageCode, $wgLang, $wgNarayamSchemes; |
| 60 | + global $wgLanguageCode, $wgLang, $wgNarayamSchemes, $wgRequest; |
61 | 61 | |
62 | 62 | $userlangCode = $wgLang->getCode(); |
63 | 63 | $contlangSchemes = isset( $wgNarayamSchemes[$wgLanguageCode] ) ? |
— | — | @@ -67,10 +67,7 @@ |
68 | 68 | $schemes = $userlangSchemes + $contlangSchemes; |
69 | 69 | |
70 | 70 | // Get user selected scheme from cookie |
71 | | - // TODO: use $wgRequest; |
72 | | - $lastScheme = isset($_COOKIE['narayam-scheme']) |
73 | | - ? $_COOKIE['narayam-scheme'] |
74 | | - : null; |
| 71 | + $lastScheme = $wgRequest->getCookie( 'narayam-scheme', '', null ); |
75 | 72 | // If user selected scheme is not in the array of schemes to be loaded |
76 | 73 | // Add it |
77 | 74 | if ( $lastScheme && !array_key_exists( $lastScheme, $schemes ) ) { |