From 426899ec1b58c10a0fb5c892ad35cd18abbf4435 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sun, 15 Aug 2004 13:49:14 +0000 Subject: [PATCH] Move check for wgUseGeoMode to where the function is called, avoids copying the text around --- includes/Parser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 ); -- 2.20.1