Index: trunk/extensions/Redirect/Redirect.class.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | private static function addRedirect( $hookName ) { |
25 | | - global $wgOut, $wgServer, $wgScript; |
| 25 | + global $wgOut; |
26 | 26 | |
27 | 27 | wfLoadExtensionMessages( 'Redirect' ); |
28 | 28 | |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | $target = Title::newFromText( $targetPage ); |
37 | 37 | |
38 | 38 | if ( $target->isKnown() ) { |
39 | | - $wgOut->redirect( $wgServer . $wgScript . "?title=" . $target ); |
| 39 | + $wgOut->redirect( $target->getFullUrl() ); |
40 | 40 | } |
41 | 41 | |
42 | 42 | return true; |