From 75681bc57a4f46d0e2dbaf30da5d2343bcb7ea79 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 19 Aug 2011 17:31:40 +0000 Subject: [PATCH] Expand some more URLs: for feeds, referers and the proxy script --- includes/Feed.php | 12 ++++++------ includes/HttpFunctions.php | 2 +- includes/ProxyTools.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/Feed.php b/includes/Feed.php index 6f49931718..3e0c913f48 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -308,7 +308,7 @@ class RSSFeed extends ChannelFeed { ?> <?php print $this->getTitle() ?> - getUrl() ?> + getUrl(), PROTO_CURRENT ) ?> getDescription() ?> getLanguage() ?> MediaWiki @@ -324,12 +324,12 @@ class RSSFeed extends ChannelFeed { ?> <?php print $item->getTitle() ?> - getUrl() ?> + getUrl(), PROTO_CURRENT ) ?> RSSIsPermalink ) print ' isPermaLink="false"' ?>>getUniqueId() ?> getDescription() ?> getDate() ) { ?>formatTime( $item->getDate() ) ?> getAuthor() ) { ?>getAuthor() ?> - getComments() ) { ?>getComments() ?> + getComments() ) { ?>getComments(), PROTO_CURRENT ) ?> getFeedId() ?> <?php print $this->getTitle() ?> - - + + formatTime( wfTimestampNow() ) ?>Z getDescription() ?> MediaWiki @@ -410,7 +410,7 @@ class AtomFeed extends ChannelFeed { getUniqueId() ?> <?php print $item->getTitle() ?> - + getDate() ) { ?> formatTime( $item->getDate() ) ?>Z diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 638788b33c..33c2916ca5 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -381,7 +381,7 @@ class MWHttpRequest { } if ( is_object( $wgTitle ) && !isset( $this->reqHeaders['Referer'] ) ) { - $this->setReferer( $wgTitle->getFullURL() ); + $this->setReferer( wfExpandUrl( $wgTitle->getFullURL(), PROTO_CURRENT ) ); } if ( !$this->noProxy ) { diff --git a/includes/ProxyTools.php b/includes/ProxyTools.php index f0c0c6987d..bc01a6e8c1 100644 --- a/includes/ProxyTools.php +++ b/includes/ProxyTools.php @@ -83,7 +83,7 @@ function wfProxyCheck() { if ( !$skip ) { $title = SpecialPage::getTitleFor( 'Blockme' ); $iphash = md5( $ip . $wgProxyKey ); - $url = $title->getFullURL( 'ip='.$iphash ); + $url = wfExpandUrl( $title->getFullURL( 'ip='.$iphash ), PROTO_HTTP ); foreach ( $wgProxyPorts as $port ) { $params = implode( ' ', array( -- 2.20.1