| Index: trunk/phase3/includes/RecentChange.php |
| — | — | @@ -707,9 +707,7 @@ |
| 708 | 708 | // XXX: *HACK^2* the preg_replace() undoes much of what getInternalURL() does, but we |
| 709 | 709 | // XXX: need to call it so that URL paths on the Wikimedia secure server can be fixed |
| 710 | 710 | // XXX: by a custom GetInternalURL hook --vyznev 2008-12-10 |
| 711 | | - // XXX: Also, getInternalUrl() may return a protocol-relative URL. |
| 712 | | - // XXX: In that case, expand it to an HTTP URL, even if this is an HTTPS request --catrope 2011-08-17 |
| 713 | | - $url = preg_replace( '/title=[^&]*&/', '', wfExpandUrl( $titleObj->getInternalURL( $url ), PROTO_HTTP ) ); |
| | 711 | + $url = preg_replace( '/title=[^&]*&/', '', $titleObj->getInternalURL( $url ) ); |
| 714 | 712 | } |
| 715 | 713 | |
| 716 | 714 | if( isset( $this->mExtra['oldSize'] ) && isset( $this->mExtra['newSize'] ) ) { |
| Index: trunk/phase3/includes/Title.php |
| — | — | @@ -992,6 +992,10 @@ |
| 993 | 993 | * Get the URL form for an internal link. |
| 994 | 994 | * - Used in various Squid-related code, in case we have a different |
| 995 | 995 | * internal hostname for the server from the exposed one. |
| | 996 | + * |
| | 997 | + * This uses $wgInternalServer to qualify the path, or $wgServer |
| | 998 | + * if $wgInternalServer is not set. If the server variable used is |
| | 999 | + * protocol-relative, the URL will be expanded to http:// |
| 996 | 1000 | * |
| 997 | 1001 | * @param $query String an optional query string |
| 998 | 1002 | * @param $variant String language variant of url (for sr, zh..) |
| — | — | @@ -1000,7 +1004,7 @@ |
| 1001 | 1005 | public function getInternalURL( $query = '', $variant = false ) { |
| 1002 | 1006 | global $wgInternalServer, $wgServer; |
| 1003 | 1007 | $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer; |
| 1004 | | - $url = $server . $this->getLocalURL( $query, $variant ); |
| | 1008 | + $url = wfExpandUrl( $server . $this->getLocalURL( $query, $variant ), PROTO_HTTP ); |
| 1005 | 1009 | wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) ); |
| 1006 | 1010 | return $url; |
| 1007 | 1011 | } |