return fragment even when we have no iw
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 1 May 2006 16:06:14 +0000 (16:06 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 1 May 2006 16:06:14 +0000 (16:06 +0000)
includes/Title.php

index 5c05477..5d295a0 100644 (file)
@@ -771,10 +771,13 @@ class Title {
                                }
                                $url .= $query;
                        }
-                       if ( '' != $this->mFragment ) {
-                               $url .= '#' . $this->mFragment;
-                       }
                }
+
+               # Finally, add the fragment.
+               if ( '' != $this->mFragment ) {
+                       $url .= '#' . $this->mFragment;
+               }
+
                wfRunHooks( 'GetFullURL', array( &$this, &$url, $query ) );
                return $url;
        }