r45631 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45630‎ | r45631 | r45632 >
Date:11:02, 10 January 2009
Author:ialex
Status:deferred
Tags:
Comment:
Use $target->getFullUrl() rather than recreating the full URL with configuration settings
Modified paths:
  • /trunk/extensions/Redirect/Redirect.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Redirect/Redirect.class.php
@@ -21,7 +21,7 @@
2222 }
2323
2424 private static function addRedirect( $hookName ) {
25 - global $wgOut, $wgServer, $wgScript;
 25+ global $wgOut;
2626
2727 wfLoadExtensionMessages( 'Redirect' );
2828
@@ -35,7 +35,7 @@
3636 $target = Title::newFromText( $targetPage );
3737
3838 if ( $target->isKnown() ) {
39 - $wgOut->redirect( $wgServer . $wgScript . "?title=" . $target );
 39+ $wgOut->redirect( $target->getFullUrl() );
4040 }
4141
4242 return true;

Status & tagging log