r3731 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r3730‎ | r3731 | r3732 >
Date:01:24, 29 May 2004
Author:vibber
Status:old
Tags:
Comment:
Fix preg_quote usage in interwiki loop detection
Modified paths:
  • /trunk/phase3/index.php (modified) (history)

Diff [purge]

Index: trunk/phase3/index.php
@@ -67,7 +67,7 @@
6868 } else if ( $wgTitle->getInterwiki() != "" ) {
6969 $url = $wgTitle->getFullURL();
7070 # Check for a redirect loop
71 - if ( !preg_match( "/^" . preg_quote( $wgServer ) . "/", $url ) && $wgTitle->isLocal() ) {
 71+ if ( !preg_match( "/^" . preg_quote( $wgServer, "/" ) . "/", $url ) && $wgTitle->isLocal() ) {
7272 $wgOut->redirect( $url );
7373 } else {
7474 $wgTitle = Title::newFromText( wfMsg( "badtitle" ) );

Status & tagging log