r60292 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60291‎ | r60292 | r60293 >
Date:14:12, 22 December 2009
Author:philip
Status:ok (Comments)
Tags:
Comment:
follow-up r60272. replace $_GET with $wgRequest->getText.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -845,7 +845,7 @@
846846 }
847847
848848 /** bug 21672: Add Accept-Language to Vary and XVO headers
849 - if there's no 'variant' parameter existed in $_GET.
 849+ if there's no 'variant' parameter existed in GET.
850850
851851 For example:
852852 /w/index.php?title=Main_page should always be served; but
@@ -853,8 +853,8 @@
854854
855855 patched by Liangent and Philip */
856856 function addAcceptLanguage() {
857 - global $wgContLang;
858 - if( !isset( $_GET['variant'] ) && $wgContLang->hasVariants() ) {
 857+ global $wgRequest, $wgContLang;
 858+ if( $wgRequest->getText('variant') == false && $wgContLang->hasVariants() ) {
859859 $variants = $wgContLang->getVariants();
860860 $aloption = array();
861861 foreach ( $variants as $variant ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r60293follow-up r60272 and r60292. replace getText with getCheck.philip14:36, 22 December 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60272follow-up r59522. follow Tim's suggestion to serve same vary and XVO headers ...philip18:55, 21 December 2009

Comments

#Comment by Catrope (talk | contribs)   14:16, 22 December 2009

You can use $wgRequest->getCheck( 'variant' ), which returns a boolean.

#Comment by PhiLiP (talk | contribs)   14:36, 22 December 2009

Thanks. replaced on r60293.

Status & tagging log