From 0982705a91df6892f0ac7f4cdcabba7e88b7c751 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 20 Feb 2009 14:13:43 +0000 Subject: [PATCH] Fix completely broken profiling change Thanks, Ialex. :) --- includes/Title.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 6e232aa10b..d9c19c0faa 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -869,19 +869,21 @@ class Title { public function getLinkUrl( $query = array(), $variant = false ) { wfProfileIn( __METHOD__ ); if( !is_array( $query ) ) { + wfProfileOut( __METHOD__ ); throw new MWException( 'Title::getLinkUrl passed a non-array for '. '$query' ); } if( $this->isExternal() ) { - return $this->getFullURL( $query ); + $ret = $this->getFullURL( $query ); } elseif( $this->getPrefixedText() === '' and $this->getFragment() !== '' ) { - return $this->getFragmentForURL(); + $ret = $this->getFragmentForURL(); } else { - return $this->getLocalURL( $query, $variant ) + $ret = $this->getLocalURL( $query, $variant ) . $this->getFragmentForURL(); } wfProfileOut( __METHOD__ ); + return $ret; } /** -- 2.20.1