X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWiki.php;h=eff251f6d6784b1ec0ccab17796c3f6d645d9f29;hb=ee0ff556d4feb058ad87595ff43b79fe79078198;hp=2ef1382afdf75f0aa7410c55acd06059c047cafb;hpb=0e675650aed26a742a9c2173d9469647a9f42bcc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Wiki.php b/includes/Wiki.php index 2ef1382afd..eff251f6d6 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -26,9 +26,8 @@ * @internal documentation reviewed 15 Mar 2010 */ class MediaWiki { - /** - * TODO: fold $output, etc, into this + * @todo Fold $output, etc, into this * @var IContextSource */ private $context; @@ -117,7 +116,11 @@ class MediaWiki { } // Use the main page as default title if nothing else has been provided - if ( $ret === null && strval( $title ) === '' && !$request->getCheck( 'curid' ) && $action !== 'delete' ) { + if ( $ret === null + && strval( $title ) === '' + && !$request->getCheck( 'curid' ) + && $action !== 'delete' + ) { $ret = Title::newMainPage(); } @@ -542,7 +545,7 @@ class MediaWiki { $request->getProtocol() == 'http' ) { $oldUrl = $request->getFullRequestURL(); - $redirUrl = str_replace( 'http://', 'https://', $oldUrl ); + $redirUrl = preg_replace( '#^http://#', 'https://', $oldUrl ); if ( $request->wasPosted() ) { // This is weird and we'd hope it almost never happens. This