Reverse a bad decision in r93820, which added a comment to WebRequest::getFullRequest...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 19 Aug 2011 13:25:43 +0000 (13:25 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 19 Aug 2011 13:25:43 +0000 (13:25 +0000)
includes/WebRequest.php
includes/Wiki.php

index 48472c9..90d5346 100644 (file)
@@ -603,14 +603,14 @@ class WebRequest {
         * Return the request URI with the canonical service and hostname, path,
         * and query string. This will be suitable for use as an absolute link
         * in HTML or other output.
-        *
-        * NOTE: This will output a protocol-relative URL if $wgServer is protocol-relative
+        * 
+        * If $wgServer is protocol-relative, this will return a fully
+        * qualified URL with the protocol that was used for this request.
         *
         * @return String
         */
        public function getFullRequestURL() {
-               global $wgServer;
-               return $wgServer . $this->getRequestURL();
+               return wfExpandUrl( $this->getRequestURL(), PROTO_CURRENT );
        }
 
        /**
index 1ba71a5..71a7952 100644 (file)
@@ -187,7 +187,7 @@ class MediaWiki {
                                        $title = SpecialPage::getTitleFor( $name, $subpage );
                                }
                        }
-                       $targetUrl = $title->getFullURL();
+                       $targetUrl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
                        // Redirect to canonical url, make it a 301 to allow caching
                        if ( $targetUrl == $request->getFullRequestURL() ) {
                                $message = "Redirect loop detected!\n\n" .