r75285 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75284‎ | r75285 | r75286 >
Date:20:02, 23 October 2010
Author:tomasz
Status:deferred
Tags:
Comment:
Adding variable target support
Modified paths:
  • /trunk/extensions/GeoLite/GeoLite_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GeoLite/GeoLite_body.php
@@ -44,8 +44,13 @@
4545 return;
4646 }
4747 }
48 - // No valid IP or chapter page - let's just go for the general one
49 - $wgOut->redirect( $wgLandingPageBase . $target . '/' . $lang . $tracking );
 48+ // No valid IP or chapter page - let's just go for the passed in url or our fallback
 49+ if ( Http::isValidURI ( $target ) ) {
 50+ $wgOut->redirect( $target . '/' . $lang . $tracking );
 51+ return;
 52+ } else {
 53+ $wgOut->redirect( $wgLandingPageBase . $target . '/' . $lang . $tracking );
 54+ }
5055 }
5156
5257 public function getDestination( $utm_source ) {

Status & tagging log