Fix completely broken profiling change
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 20 Feb 2009 14:13:43 +0000 (14:13 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 20 Feb 2009 14:13:43 +0000 (14:13 +0000)
Thanks, Ialex.  :)

includes/Title.php

index 6e232aa..d9c19c0 100644 (file)
@@ -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;
        }
 
        /**