r5318 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5317‎ | r5318 | r5319 >
Date:05:22, 20 September 2004
Author:zhengzhu
Status:old
Tags:
Comment:
added a language variant field to the page rendering hash, but only for languages that support multiple variants.
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -814,6 +814,7 @@
815815 }
816816
817817 function getPageRenderingHash() {
 818+ global $wgLang;
818819 if( $this->mHash ){
819820 return $this->mHash;
820821 }
@@ -830,6 +831,12 @@
831832 $confstr .= '!' . $this->getOption( 'date' );
832833 $confstr .= '!' . $this->getOption( 'numberheadings' );
833834
 835+ // add in language variant option if there are multiple variants
 836+ // supported by the language object
 837+ if(sizeof($wgLang->getVariants())>1) {
 838+ $confstr .= '!' . $this->getOption( 'variant' );
 839+ }
 840+
834841 $this->mHash = $confstr;
835842 return $confstr ;
836843 }

Status & tagging log