Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -574,7 +574,7 @@ |
575 | 575 | 'revision' => strval( $oldid ), |
576 | 576 | 'latest' => strval( $latest ), |
577 | 577 | 'timestamp' => wfTimestamp( TS_UNIX, $revision->mTimestamp ), |
578 | | - 'url' => $title->getFullURL(), |
| 578 | + 'url' => $title->getCanonicalURL(), |
579 | 579 | 'currentVersion' => $currentVersion, |
580 | 580 | ); |
581 | 581 | |
— | — | @@ -764,7 +764,7 @@ |
765 | 765 | 'latest' => $latest, |
766 | 766 | 'revision' => $oldid, |
767 | 767 | 'timestamp' => wfTimestamp( TS_UNIX, $revision->mTimestamp ), |
768 | | - 'url' => $articleTitle->getFullURL(), |
| 768 | + 'url' => $articleTitle->getCanonicalURL(), |
769 | 769 | 'currentVersion' => $currentVersion, |
770 | 770 | ); |
771 | 771 | if ( $displayTitle ) { |
— | — | @@ -959,7 +959,7 @@ |
960 | 960 | |
961 | 961 | $response = self::mwServeCommand( 'render', array( |
962 | 962 | 'metabook' => $this->buildJSONCollection( $collection ), |
963 | | - 'base_url' => wfExpandUrl( $wgScriptPath ), |
| 963 | + 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CANONICAL ), |
964 | 964 | 'script_extension' => $wgScriptExtension, |
965 | 965 | 'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ), |
966 | 966 | 'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ), |
— | — | @@ -992,7 +992,7 @@ |
993 | 993 | |
994 | 994 | $response = self::mwServeCommand( 'render', array( |
995 | 995 | 'collection_id' => $collectionID, |
996 | | - 'base_url' => wfExpandUrl( $wgScriptPath ), |
| 996 | + 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CANONICAL ), |
997 | 997 | 'script_extension' => $wgScriptExtension, |
998 | 998 | 'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ), |
999 | 999 | 'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ), |
— | — | @@ -1067,7 +1067,7 @@ |
1068 | 1068 | $wgOut->setPageTitle( wfMsg( 'coll-rendering_finished_title' ) ); |
1069 | 1069 | |
1070 | 1070 | $template = new CollectionFinishedTemplate(); |
1071 | | - $template->set( 'download_url', wfExpandUrl( SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=download&' . $query ) ) ); |
| 1071 | + $template->set( 'download_url', wfExpandUrl( SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=download&' . $query ), PROTO_CURRENT ) ); |
1072 | 1072 | $template->set( 'is_cached', $wgRequest->getVal( 'is_cached' ) ); |
1073 | 1073 | $template->set( 'query', $query ); |
1074 | 1074 | $template->set( 'return_to', $return_to ); |
— | — | @@ -1163,7 +1163,7 @@ |
1164 | 1164 | |
1165 | 1165 | $response = self::mwServeCommand( 'zip_post', array( |
1166 | 1166 | 'metabook' => $this->buildJSONCollection( $collection ), |
1167 | | - 'base_url' => wfExpandUrl( $wgScriptPath ), |
| 1167 | + 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CANONICAL ), |
1168 | 1168 | 'script_extension' => $wgScriptExtension, |
1169 | 1169 | 'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ), |
1170 | 1170 | 'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ), |
— | — | @@ -1284,7 +1284,7 @@ |
1285 | 1285 | curl_setopt( $c, CURLOPT_HTTPHEADER, array( 'Expect:' ) ); |
1286 | 1286 | curl_setopt( $c, CURLOPT_HEADER, false ); |
1287 | 1287 | if ( is_object( $wgTitle ) ) { |
1288 | | - curl_setopt( $c, CURLOPT_REFERER, $wgTitle->getFullURL() ); |
| 1288 | + curl_setopt( $c, CURLOPT_REFERER, wfExpandUrl( $wgTitle->getFullURL(), PROTO_CURRENT ) ); |
1289 | 1289 | } |
1290 | 1290 | if ( $timeout ) { |
1291 | 1291 | curl_setopt( $c, CURLOPT_TIMEOUT, $wgHTTPTimeout ); |
Index: trunk/extensions/Collection/Collection.php |
— | — | @@ -216,12 +216,12 @@ |
217 | 217 | $r = new AjaxResponse(); |
218 | 218 | if ( $redirect ) { |
219 | 219 | $title = Title::newFromText( $redirect ); |
220 | | - $redirecturl = $title->getFullURL(); |
| 220 | + $redirecturl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
221 | 221 | $r->setResponseCode( 302 ); |
222 | 222 | header( 'Location: ' . $redirecturl ); |
223 | 223 | } else { |
224 | 224 | $title = SpecialPage::getTitleFor( 'Book' ); |
225 | | - $redirecturl = $title->getFullURL(); |
| 225 | + $redirecturl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
226 | 226 | $r->setContentType( 'application/json' ); |
227 | 227 | $r->addText( $json->encode( array( 'redirect_url' => $redirecturl ) ) ); |
228 | 228 | } |