From: Jens Frank Date: Sun, 15 Aug 2004 13:49:14 +0000 (+0000) Subject: Move check for wgUseGeoMode to where the function is called, avoids copying the text... X-Git-Tag: 1.5.0alpha1~2330 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=426899ec1b58c10a0fb5c892ad35cd18abbf4435;p=lhc%2Fweb%2Fwiklou.git Move check for wgUseGeoMode to where the function is called, avoids copying the text around --- diff --git a/includes/Parser.php b/includes/Parser.php index 49cda15e13..8fd7ae069d 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -888,8 +888,11 @@ class Parser } /* private */ function &doMagicLinks( &$text ) { + global $wgUseGeoMode; $text = $this->magicISBN( $text ); - $text = $this->magicGEO( $text ); + if ( isset( $wgUseGeoMode ) && $wgUseGeoMode ) { + $text = $this->magicGEO( $text ); + } $text = $this->magicRFC( $text ); return $text; } @@ -2360,7 +2363,6 @@ class Parser # Return an HTML link for the "GEO ..." text /* private */ function magicGEO( $text ) { global $wgLang, $wgUseGeoMode; - if ( !isset ( $wgUseGeoMode ) || !$wgUseGeoMode ) return $text ; $fname = 'Parser::magicGEO'; wfProfileIn( $fname );