http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95901
Revision: 95901
Author: catrope
Date: 2011-08-31 19:15:33 +0000 (Wed, 31 Aug 2011)
Log Message:
-----------
1.17wmf1: MFT HTTPS / prot rel URL fixes: r95627, r95651, r95652, r95653,
r95656, r95659, r95663, r95855, r95894, r95899
Modified Paths:
--------------
branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.class.php
branches/wmf/1.17wmf1/extensions/ActiveAbstract/AbstractFilter.php
branches/wmf/1.17wmf1/extensions/ActiveAbstract/GoogleCoopFilter.php
branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
branches/wmf/1.17wmf1/extensions/CodeReview/tests/CodeReviewTest.php
branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php
branches/wmf/1.17wmf1/extensions/Collection/Collection.body.php
branches/wmf/1.17wmf1/extensions/Collection/Collection.php
branches/wmf/1.17wmf1/extensions/ContributionTracking/ContributionTracking.processor.php
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingAPITest.php
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingProcessorTest.php
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingTest.php
branches/wmf/1.17wmf1/extensions/EmailCapture/api/ApiEmailCapture.php
branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/NewMessagesController.php
branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/View.php
branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php
branches/wmf/1.17wmf1/extensions/OpenSearchXml/ApiOpenSearchXml.php
branches/wmf/1.17wmf1/extensions/SecurePoll/includes/entities/Election.php
branches/wmf/1.17wmf1/extensions/SecurePoll/includes/user/Auth.php
branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrixApi.php
branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrix_body.php
branches/wmf/1.17wmf1/extensions/SpamBlacklist/SpamBlacklist_body.php
branches/wmf/1.17wmf1/includes/Title.php
branches/wmf/1.17wmf1/includes/WikiMap.php
Property Changed:
----------------
branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
branches/wmf/1.17wmf1/includes/Title.php
Modified: branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.class.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.class.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.class.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -1700,12 +1700,12 @@
static function modifyActionText( $page, $type, $title, $sk, $args ) {
list( $history_id, $filter_id ) = $args;
- $filter_link = $sk ? $sk->link( $title ) : $title->getFullURL();
+ $filter_link = $sk ? $sk->link( $title ) :
$title->getCanonicalURL();
$details_title = SpecialPage::getTitleFor( 'AbuseFilter',
"history/$filter_id/diff/prev/$history_id" );
$details_text = wfMsgExt( 'abusefilter-log-detailslink',
'parseinline' );
$details_link =
- $sk ? $sk->link( $details_title, $details_text ) :
$details_title->getFullURL();
+ $sk ? $sk->link( $details_title, $details_text ) :
$details_title->getCanonicalURL();
return wfMsgExt( 'abusefilter-log-entry-modify',
array( 'parseinline', 'replaceafter' ), array(
$filter_link, $details_link ) );
Modified: branches/wmf/1.17wmf1/extensions/ActiveAbstract/AbstractFilter.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/ActiveAbstract/AbstractFilter.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/ActiveAbstract/AbstractFilter.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -55,7 +55,7 @@
$xml = "<doc>\n";
$xml .= Xml::element( 'title', null, $this->_variant( $title )
) . "\n";
- $xml .= Xml::element( 'url', null, $this->title->getFullUrl() )
. "\n";
+ $xml .= Xml::element( 'url', null,
$this->title->getCanonicalUrl() ) . "\n";
// add abstract and links when we have revision data...
$this->revision = null;
@@ -214,7 +214,7 @@
$stripped = $this->_stripMarkup( $inside ); // strip
internal markup and <h[1-6]>
$header = UtfNormal::cleanUp( $stripped );
$anchor = EditPage::sectionAnchor( $header );
- $url = $this->title->getFullUrl() . $anchor;
+ $url = $this->title->getCanonicalUrl() . $anchor;
$headers[$header] = $url;
}
return $headers;
@@ -237,7 +237,7 @@
$links = array();
while ( $row = $dbr->fetchObject( $result ) ) {
$category = Title::makeTitle( NS_CATEGORY, $row->cl_to
);
- $links[$category->getText()] = $category->getFullUrl();
+ $links[$category->getText()] =
$category->getCanonicalUrl();
}
$dbr->freeResult( $result );
Modified: branches/wmf/1.17wmf1/extensions/ActiveAbstract/GoogleCoopFilter.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/ActiveAbstract/GoogleCoopFilter.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/ActiveAbstract/GoogleCoopFilter.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -72,7 +72,7 @@
$xml .= ' ' . Xml::element( 'Output', array( 'name' =>
'title' ),
$wgSitename . ':' .
$this->title->getPrefixedText() ) . "\n";
$xml .= ' ' . Xml::element( 'Output', array( 'name' =>
'more_url' ),
- $this->title->getFullUrl() ) . "\n";
+ $this->title->getCanonicalUrl() ) . "\n";
// add abstract and links when we have revision data...
$this->revision = null;
Modified: branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -1179,8 +1179,7 @@
protected static function getIRCLine( $userpage, $wikiID ) {
$title = RecentChange::cleanupForIRC(
$userpage->getPrefixedText() );
$wikiID = RecentChange::cleanupForIRC( $wikiID );
- // FIXME: *HACK* should be getFullURL(), hacked for SSL madness
- $url = $userpage->getInternalURL();
+ $url = $userpage->getCanonicalURL();
$user = RecentChange::cleanupForIRC( $userpage->getText() );
# see http://www.irssi.org/documentation/formats for some
colour codes. prefix is \003,
# no colour (\003) switches back to the term default
Property changes on:
branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/extensions/CentralAuth/CentralAuthUser.php:51646
/branches/new-installer/phase3/extensions/CentralAuth/CentralAuthUser.php:43664-66004
/branches/sqlite/extensions/CentralAuth/CentralAuthUser.php:58211-58321
/branches/wmf/1.16wmf4/extensions/CentralAuth/CentralAuthUser.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/CentralAuth/CentralAuthUser.php:60970
/trunk/extensions/CentralAuth/CentralAuthUser.php:80370
/trunk/phase3/extensions/CentralAuth/CentralAuthUser.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833
+ /branches/REL1_15/phase3/extensions/CentralAuth/CentralAuthUser.php:51646
/branches/new-installer/phase3/extensions/CentralAuth/CentralAuthUser.php:43664-66004
/branches/sqlite/extensions/CentralAuth/CentralAuthUser.php:58211-58321
/branches/wmf/1.16wmf4/extensions/CentralAuth/CentralAuthUser.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/CentralAuth/CentralAuthUser.php:60970
/trunk/extensions/CentralAuth/CentralAuthUser.php:80370,95652-95653,95656,95659,95663,95855
/trunk/phase3/extensions/CentralAuth/CentralAuthUser.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833,95627,95651
Modified:
branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
===================================================================
---
branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
2011-08-31 19:09:40 UTC (rev 95900)
+++
branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -53,7 +53,7 @@
$htmlOut .= Xml::element( 'h2', null, wfMsg(
'centralnotice-view-logs' ) );
$htmlOut .= Xml::openElement( 'div', array( 'id' =>
'cn-log-switcher' ) );
$title = SpecialPage::getTitleFor( 'CentralNoticeLogs' );
- $fullUrl = $title->getFullUrl();
+ $fullUrl = wfExpandUrl( $title->getFullUrl(), PROTO_CURRENT );
$htmlOut .= Xml::radio(
'log_type',
Property changes on:
branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
___________________________________________________________________
Modified: svn:mergeinfo
-
/branches/wmf/1.16wmf4/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:60970
/trunk/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850,73852,73855,73959,73963,73973,73980,73983,73991,73994-73995,74000-74321,74325-74406,75376-75470,75567,75643,75646,75674,75680,75726,75849,75889,75908,75973,76141,76145,76333,76347,76351,76356-76358,76361,76363,76462,76543,76763,77622-79761,79780,79783-80145,80147-80148,80150,80152-80602,81461-83563,83565-91117,91146,91368-95516
/trunk/phase3/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573
+
/branches/wmf/1.16wmf4/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:60970
/trunk/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850,73852,73855,73959,73963,73973,73980,73983,73991,73994-73995,74000-74321,74325-74406,75376-75470,75567,75643,75646,75674,75680,75726,75849,75889,75908,75973,76141,76145,76333,76347,76351,76356-76358,76361,76363,76462,76543,76763,77622-79761,79780,79783-80145,80147-80148,80150,80152-80602,81461-83563,83565-91117,91146,91368-95516,95652-95653,95656,95659,95663,95855
/trunk/phase3/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573,95627,95651
Modified: branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -439,13 +439,13 @@
);
// Get repo and build comment title (for url)
- $url = $this->getFullUrl();
+ $url = $this->getCanonicalUrl();
foreach ( $res as $row ) {
$revision = CodeRevision::newFromRow(
$this->repo, $row );
$users = $revision->getCommentingUsers();
- $rowUrl = $revision->getFullUrl();
+ $rowUrl = $revision->getCanonicalUrl();
$revisionAuthor = $revision->getWikiUser();
@@ -623,7 +623,7 @@
$commentId = $dbw->insertId();
$dbw->commit();
- $url = $this->getFullUrl( $commentId );
+ $url = $this->getCanonicalUrl( $commentId );
$this->sendCommentToUDP( $commentId, $text, $url );
@@ -1238,10 +1238,12 @@
}
/**
+ * Get the canonical URL of a revision. Constructs a Title for this
revision
+ * along the lines of [[Special:Code/RepoName/12345#c678]] and calls
getCanonicalUrl().
* @param string $commentId
* @return \type
*/
- public function getFullUrl( $commentId = 0 ) {
+ public function getCanonicalUrl( $commentId = 0 ) {
$title = SpecialPage::getTitleFor( 'Code',
$this->repo->getName() . '/' . $this->id );
# Append comment id if not null, empty string or zero
@@ -1249,7 +1251,7 @@
$title->setFragment( "#c{$commentId}" );
}
- return $title->getFullUrl();
+ return $title->getCanonicalUrl();
}
/**
@@ -1263,7 +1265,7 @@
if( $wgCodeReviewUDPAddress ) {
if( is_null( $url ) ) {
- $url = $this->getFullUrl( $commentId );
+ $url = $this->getCanonicalUrl( $commentId );
}
$line = wfMsg( 'code-rev-message' ) . " \00314(" .
$this->repo->getName() .
@@ -1282,7 +1284,7 @@
global $wgCodeReviewUDPAddress, $wgCodeReviewUDPPort,
$wgCodeReviewUDPPrefix, $wgUser;
if( $wgCodeReviewUDPAddress ) {
- $url = $this->getFullUrl();
+ $url = $this->getCanonicalUrl();
$line = wfMsg( 'code-rev-status' ) . " \00314(" .
$this->repo->getName() .
")\00303 " .
RecentChange::cleanupForIRC( $wgUser->getName() ) . "\003 " .
Property changes on:
branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
___________________________________________________________________
Modified: svn:mergeinfo
- /backend/CodeRevision.php:91549
/branches/REL1_15/phase3/extensions/CodeReview/backend/CodeRevision.php:51646
/branches/new-installer/phase3/extensions/CodeReview/backend/CodeRevision.php:43664-66004
/branches/sqlite/extensions/CodeReview/backend/CodeRevision.php:58211-58321
/branches/wmf/1.16wmf4/extensions/CodeReview/backend/CodeRevision.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/CodeReview/backend/CodeRevision.php:60970
/trunk/extensions/CodeReview/backend/CodeRevision.php:77974-93070,93108-93109,94506
/trunk/phase3/extensions/CodeReview/backend/CodeRevision.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833,83212,83590
+ /backend/CodeRevision.php:91549
/branches/REL1_15/phase3/extensions/CodeReview/backend/CodeRevision.php:51646
/branches/new-installer/phase3/extensions/CodeReview/backend/CodeRevision.php:43664-66004
/branches/sqlite/extensions/CodeReview/backend/CodeRevision.php:58211-58321
/branches/wmf/1.16wmf4/extensions/CodeReview/backend/CodeRevision.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/CodeReview/backend/CodeRevision.php:60970
/trunk/extensions/CodeReview/backend/CodeRevision.php:77974-93070,93108-93109,94506,95652-95653,95656,95659,95663,95855
/trunk/phase3/extensions/CodeReview/backend/CodeRevision.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833,83212,83590,95627,95651
Modified: branches/wmf/1.17wmf1/extensions/CodeReview/tests/CodeReviewTest.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/CodeReview/tests/CodeReviewTest.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/CodeReview/tests/CodeReviewTest.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -40,4 +40,28 @@
// $this->assertEquals( '', $formatter->link( '' ) );
}
-}
\ No newline at end of file
+}
+ public function testCommentCanonicalUrl() {
+ # Fixture:
+ $repo = $this->createRepo();
+ $cr = CodeRevision::newFromSvn( $repo, array(
+ 'rev' => 305,
+ 'author' => 'hashar',
+ 'date' => '15 august 2011',
+ 'msg' => 'dumb revision message',
+ 'paths' => array( '/dev/null' ),
+ )
+ );
+
+ # Find out our revision root URL
+ $baseUrl = SpecialPage::getTitleFor( 'Code',
$repo->getName().'/305' )->getCanonicalUrl();
+
+ # Test revision URL with various comment id:
+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( '' ) );
+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( 0 ) );
+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( null ) );
+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( "0" ) );
+ $this->assertEquals( $baseUrl . '#c777', $cr->getCanonicalUrl(
777 ) );
+ $this->assertEquals( $baseUrl . '#c777', $cr->getCanonicalUrl(
"777" ) );
+ }
+}
Modified:
branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -117,7 +117,7 @@
$dbw->commit();
if ( $statusChanged || $commentAdded ) {
- $url = $this->mRev->getFullUrl( $commentId );
+ $url = $this->mRev->getCanonicalUrl( $commentId );
if ( $statusChanged && $commentAdded ) {
$this->mRev->emailNotifyUsersOfChanges(
'codereview-email-subj4', 'codereview-email-body4',
$wgUser->getName(),
$this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(),
Modified: branches/wmf/1.17wmf1/extensions/Collection/Collection.body.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/Collection/Collection.body.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/Collection/Collection.body.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -581,7 +581,7 @@
'revision' => strval( $oldid ),
'latest' => strval( $latest ),
'timestamp' => wfTimestamp( TS_UNIX,
$revision->mTimestamp ),
- 'url' => $title->getFullURL(),
+ 'url' => $title->getCanonicalURL(),
'currentVersion' => $currentVersion,
);
@@ -766,7 +766,7 @@
'latest' => $latest,
'revision' => $oldid,
'timestamp' => wfTimestamp( TS_UNIX,
$revision->mTimestamp ),
- 'url' => $articleTitle->getFullURL(),
+ 'url' => $articleTitle->getCanonicalURL(),
'currentVersion' => $currentVersion,
);
if ( $displayTitle ) {
@@ -956,7 +956,7 @@
$response = self::mwServeCommand( 'render', array(
'metabook' => $this->buildJSONCollection( $collection ),
- 'base_url' => wfExpandUrl( $wgScriptPath ),
+ 'base_url' => wfExpandUrl( $wgScriptPath,
PROTO_CANONICAL ),
'script_extension' => $wgScriptExtension,
'template_blacklist' => wfMsgForContent(
'coll-template_blacklist_title' ),
'template_exclusion_category' => wfMsgForContent(
'coll-exclusion_category_title' ),
@@ -989,7 +989,7 @@
$response = self::mwServeCommand( 'render', array(
'collection_id' => $collectionID,
- 'base_url' => wfExpandUrl( $wgScriptPath ),
+ 'base_url' => wfExpandUrl( $wgScriptPath,
PROTO_CANONICAL ),
'script_extension' => $wgScriptExtension,
'template_blacklist' => wfMsgForContent(
'coll-template_blacklist_title' ),
'template_exclusion_category' => wfMsgForContent(
'coll-exclusion_category_title' ),
@@ -1071,7 +1071,7 @@
$wgOut->setPageTitle( wfMsg(
'coll-rendering_finished_title' ) );
$template = new CollectionFinishedTemplate();
- $template->set( 'download_url', wfExpandUrl(
SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=download&' . $query ) ) );
+ $template->set( 'download_url', wfExpandUrl(
SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=download&' . $query ),
PROTO_CURRENT ) );
$template->set( 'is_cached', $wgRequest->getVal(
'is_cached' ) );
$template->set( 'query', $query );
$template->set( 'return_to', $return_to );
@@ -1161,7 +1161,7 @@
$response = self::mwServeCommand( 'zip_post', array(
'metabook' => $this->buildJSONCollection( $collection ),
- 'base_url' => wfExpandUrl( $wgScriptPath ),
+ 'base_url' => wfExpandUrl( $wgScriptPath,
PROTO_CANONICAL ),
'script_extension' => $wgScriptExtension,
'template_blacklist' => wfMsgForContent(
'coll-template_blacklist_title' ),
'template_exclusion_category' => wfMsgForContent(
'coll-exclusion_category_title' ),
@@ -1282,7 +1282,7 @@
curl_setopt( $c, CURLOPT_HTTPHEADER, array( 'Expect:' ) );
curl_setopt( $c, CURLOPT_HEADER, false );
if ( is_object( $wgTitle ) ) {
- curl_setopt( $c, CURLOPT_REFERER,
$wgTitle->getFullURL() );
+ curl_setopt( $c, CURLOPT_REFERER, wfExpandUrl(
$wgTitle->getFullURL(), PROTO_CURRENT ) );
}
if ( $timeout ) {
curl_setopt( $c, CURLOPT_TIMEOUT, $wgHTTPTimeout );
Modified: branches/wmf/1.17wmf1/extensions/Collection/Collection.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/Collection/Collection.php 2011-08-31
19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/Collection/Collection.php 2011-08-31
19:15:33 UTC (rev 95901)
@@ -219,12 +219,12 @@
$r = new AjaxResponse();
if ( $redirect ) {
$title = Title::newFromText( $redirect );
- $redirecturl = $title->getFullURL();
+ $redirecturl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT
);
$r->setResponseCode( 302 );
header( 'Location: ' . $redirecturl );
} else {
$title = SpecialPage::getTitleFor( 'Book' );
- $redirecturl = $title->getFullURL();
+ $redirecturl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT
);
$r->setContentType( 'application/json' );
$r->addText( $json->encode( array( 'redirect_url' =>
$redirecturl ) ) );
}
Modified:
branches/wmf/1.17wmf1/extensions/ContributionTracking/ContributionTracking.processor.php
===================================================================
---
branches/wmf/1.17wmf1/extensions/ContributionTracking/ContributionTracking.processor.php
2011-08-31 19:09:40 UTC (rev 95900)
+++
branches/wmf/1.17wmf1/extensions/ContributionTracking/ContributionTracking.processor.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -322,7 +322,7 @@
$returnText = $input['return'];
$returnTitle = Title::newFromText( $returnText );
if ( $returnTitle ) {
- $returnto = $returnTitle->getFullUrl();
+ $returnto = wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_CURRENT );
} else {
$returnto =
$wgContributionTrackingReturnToURLDefault . "/$language";
}
Modified:
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingAPITest.php
===================================================================
---
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingAPITest.php
2011-08-31 19:09:40 UTC (rev 95900)
+++
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingAPITest.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -90,7 +90,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -124,7 +124,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -171,7 +171,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
//Important to the language test.
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ), //Important to the language test.
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -209,7 +209,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
Modified:
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingProcessorTest.php
===================================================================
---
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingProcessorTest.php
2011-08-31 19:09:40 UTC (rev 95900)
+++
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingProcessorTest.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -196,7 +196,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -261,7 +261,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullURL(),
//Important to the language test.
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ), //Important to the language test.
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -288,7 +288,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullURL(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
Modified:
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingTest.php
===================================================================
---
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingTest.php
2011-08-31 19:09:40 UTC (rev 95900)
+++
branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingTest.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -113,7 +113,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -147,7 +147,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -194,7 +194,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
//Important to the language test.
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ), //Important to the language test.
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -233,7 +233,7 @@
'business' => '[email protected]',
'item_number' => 'DONATE',
'no_note' => 0,
- 'return' => $returnTitle->getFullUrl(),
+ 'return' => wfExpandUrl(
$returnTitle->getFullUrl(), PROTO_HTTP ),
'currency_code' => 'USD',
'cmd' => '_xclick',
'notify_url' =>
'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
Modified: branches/wmf/1.17wmf1/extensions/EmailCapture/api/ApiEmailCapture.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/EmailCapture/api/ApiEmailCapture.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/EmailCapture/api/ApiEmailCapture.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -33,8 +33,8 @@
// Send auto-response
global $wgUser, $wgEmailCaptureSendAutoResponse,
$wgEmailCaptureAutoResponse;
$title = SpecialPage::getTitleFor( 'EmailCapture' );
- $link = $title->getFullURL();
- $fullLink = $title->getFullURL( array( 'verify' =>
$code ) );
+ $link = $title->getCanonicalURL();
+ $fullLink = $title->getCanonicalURL( array( 'verify' =>
$code ) );
if ( $wgEmailCaptureSendAutoResponse ) {
UserMailer::send(
new MailAddress( $params['email'] ),
Modified:
branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/NewMessagesController.php
===================================================================
---
branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/NewMessagesController.php
2011-08-31 19:09:40 UTC (rev 95900)
+++
branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/NewMessagesController.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -307,7 +307,7 @@
global $wgPasswordSender;
$link_title = clone $t->getTitle();
$link_title->setFragment( '#' . $t->getAnchorName() );
- $permalink = LqtView::linkInContextURL( $t );
+ $permalink = LqtView::linkInContextCanonicalURL( $t );
$talkPage = $t->getTitle()->getPrefixedText();
$from = new MailAddress( $wgPasswordSender, 'WikiAdmin' );
$threadSubject = $t->subject();
Modified: branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/View.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/View.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/View.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -156,7 +156,13 @@
return $title->getFullURL( $query );
}
+
+ static function linkInContextCanonicalURL( $thread, $contextType =
'page' ) {
+ list( $title, $query ) = self::linkInContextData( $thread,
$contextType );
+ return $title->getCanonicalURL( $query );
+ }
+
static function diffQuery( $thread, $revision ) {
$changed_thread = $revision->getChangeObject();
$curr_rev_id = $changed_thread->rootRevision();
Modified: branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php 2011-08-31
19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php 2011-08-31
19:15:33 UTC (rev 95901)
@@ -550,7 +550,7 @@
function baseUrl() {
$title =& SpecialPage::getTitleFor( 'OAIRepository' );
- return $title->getFullUrl();
+ return $title->getCanonicalUrl();
}
function earliestDatestamp() {
@@ -831,7 +831,7 @@
oaiTag( 'dc:language', array(), $wgContLanguageCode
) . "\n" .
oaiTag( 'dc:type', array(), 'Text' ) . "\n" .
oaiTag( 'dc:format', array(), $wgMimeType ) . "\n"
.
- oaiTag( 'dc:identifier', array(), $title->getFullUrl()
) . "\n" .
+ oaiTag( 'dc:identifier', array(),
$title->getCanonicalUrl() ) . "\n" .
oaiTag( 'dc:contributor', array(),
$this->_row->rev_user_text ) . "\n" .
oaiTag( 'dc:date', array(), oaiDatestamp(
$this->getDatestamp() ) ) . "\n" .
"</oai_dc:dc>\n";
Modified: branches/wmf/1.17wmf1/extensions/OpenSearchXml/ApiOpenSearchXml.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/OpenSearchXml/ApiOpenSearchXml.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/OpenSearchXml/ApiOpenSearchXml.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -103,11 +103,11 @@
$item['Text']['*'] = $title->getPrefixedText();
$item['Description']['*'] = $extract;
- $item['Url']['*'] = $title->getFullUrl();
+ $item['Url']['*'] = wfExpandUrl( $title->getFullUrl(),
PROTO_CURRENT );
if( $image ) {
$thumb = $image->transform( array( 'width' =>
50, 'height' => 50 ), 0 );
$item['Image'] = array(
- 'source' => wfExpandUrl(
$thumb->getUrl() ),
+ 'source' => wfExpandUrl(
$thumb->getUrl(), PROTO_CURRENT ),
//alt
'width' => $thumb->getWidth(),
'height' => $thumb->getHeight() );
Modified:
branches/wmf/1.17wmf1/extensions/SecurePoll/includes/entities/Election.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/SecurePoll/includes/entities/Election.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/SecurePoll/includes/entities/Election.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -363,7 +363,7 @@
Xml::element( 'auth', array(), 'local' ) . "\n"
.
Xml::element( 'property',
array( 'name' => 'jump-url' ),
-
$this->context->getSpecialTitle()->getFullURL()
+
$this->context->getSpecialTitle()->getCanonicalUrl()
) . "\n" .
Xml::element( 'property',
array( 'name' => 'jump-id' ),
Modified: branches/wmf/1.17wmf1/extensions/SecurePoll/includes/user/Auth.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/SecurePoll/includes/user/Auth.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/SecurePoll/includes/user/Auth.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -205,7 +205,7 @@
'name' => $user->getName(),
'type' => 'local',
'domain' => preg_replace( '!.*/(.*)$!', '$1', $wgServer
),
- 'url' => $user->getUserPage()->getFullURL(),
+ 'url' => $user->getUserPage()->getCanonicalURL(),
'properties' => array(
'wiki' => wfWikiID(),
'blocked' => $user->isBlocked(),
Modified: branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrixApi.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrixApi.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrixApi.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -46,7 +46,7 @@
if ( $matrix->exist( $lang, $site ) ) {
$url = $matrix->getUrl( $lang, $site );
$site_out = array(
- 'url' => wfExpandUrl( $url ),
+ 'url' => $url,
'code' => $site,
);
if( $matrix->isClosed( $lang, $site ) )
{
@@ -68,7 +68,7 @@
$url = $matrix->getUrl( $lang, $site );
$wiki = array();
- $wiki['url'] = wfExpandUrl( $url );
+ $wiki['url'] = $url;
$wiki['code'] = str_replace( '_', '-', $lang ) . (
$site != 'wiki' ? $site : '' );
if( $matrix->isPrivate( $lang . $site ) ) {
Modified: branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrix_body.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrix_body.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrix_body.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -131,7 +131,7 @@
global $wgConf;
$dbname = $minor . $major;
$minor = str_replace( '_', '-', $minor );
- return $wgConf->get( 'wgServer', $dbname, $major,
+ return $wgConf->get( 'wgCanonicalServer', $dbname, $major,
array( 'lang' => $minor, 'site' => $major ) );
}
Modified: branches/wmf/1.17wmf1/extensions/SpamBlacklist/SpamBlacklist_body.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/SpamBlacklist/SpamBlacklist_body.php
2011-08-31 19:09:40 UTC (rev 95900)
+++ branches/wmf/1.17wmf1/extensions/SpamBlacklist/SpamBlacklist_body.php
2011-08-31 19:15:33 UTC (rev 95901)
@@ -36,7 +36,7 @@
}
}
- $thisHttp = $title->getFullUrl( 'action=raw' );
+ $thisHttp = wfExpandUrl( $title->getFullUrl( 'action=raw' ),
PROTO_HTTP );
$thisHttpRegex = '/^' . preg_quote( $thisHttp, '/' ) .
'(?:&.*)?$/';
foreach( $this->files as $fileName ) {
Modified: branches/wmf/1.17wmf1/includes/Title.php
===================================================================
--- branches/wmf/1.17wmf1/includes/Title.php 2011-08-31 19:09:40 UTC (rev
95900)
+++ branches/wmf/1.17wmf1/includes/Title.php 2011-08-31 19:15:33 UTC (rev
95901)
@@ -1008,13 +1008,15 @@
* e-mail notifications. Uses $wgCanonicalServer and the
* GetCanonicalURL hook.
*
+ * NOTE: Unlike getInternalURL(), the canonical URL includes the
fragment
+ *
* @param $query string An optional query string
* @param $variant string Language variant of URL (for sr, zh, ...)
* @return string The URL
*/
public function getCanonicalURL( $query = '', $variant = false ) {
global $wgCanonicalServer;
- $url = $wgCanonicalServer . $this->getLocalURL( $query,
$variant );
+ $url = $wgCanonicalServer . $this->getLocalURL( $query,
$variant ) . $this->getFragmentForURL();
wfRunHooks( 'GetCanonicalURL', array( &$this, &$url, $query ) );
return $url;
}
Property changes on: branches/wmf/1.17wmf1/includes/Title.php
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/includes/Title.php:51646
/branches/iwtransclusion/phase3/includes/Title.php:68448,69480
/branches/new-installer/phase3/includes/Title.php:43664-66004
/branches/sqlite/includes/Title.php:58211-58321
/branches/wmf/1.16wmf4/includes/Title.php:67177,69199,76243,77266
/branches/wmf-deployment/includes/Title.php:53381,60970
/trunk/phase3/includes/Title.php:78964,78990,79086-79087,79091,79655,79660,79706,79759,79764,79844,79915,79957,79964,79990,80432,80443,80590,80614-80616,80687,80813,80815,80999,81006,81011,81101,81105,81138,81141,81146,81149-81150,81166,81171,81548,81729,81890-81894,81896-81898,81900,82004,82022,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146,82193,82836,82853,82858,83061,83067,83114,83512,83583,83610,83716,83764,83787,83798,83813,83866,84459,84729,84820,84985,85140,85152,85194,93847,94990,94995-94996,95000-95002,95007,95010-95011,95016-95017
+ /branches/REL1_15/phase3/includes/Title.php:51646
/branches/iwtransclusion/phase3/includes/Title.php:68448,69480
/branches/new-installer/phase3/includes/Title.php:43664-66004
/branches/sqlite/includes/Title.php:58211-58321
/branches/wmf/1.16wmf4/includes/Title.php:67177,69199,76243,77266
/branches/wmf-deployment/includes/Title.php:53381,60970
/trunk/phase3/includes/Title.php:78964,78990,79086-79087,79091,79655,79660,79706,79759,79764,79844,79915,79957,79964,79990,80432,80443,80590,80614-80616,80687,80813,80815,80999,81006,81011,81101,81105,81138,81141,81146,81149-81150,81166,81171,81548,81729,81890-81894,81896-81898,81900,82004,82022,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146,82193,82836,82853,82858,83061,83067,83114,83512,83583,83610,83716,83764,83787,83798,83813,83866,84459,84729,84820,84985,85140,85152,85194,93847,94990,94995-94996,95000-95002,95007,95010-95011,95016-95017,95627,95651
Modified: branches/wmf/1.17wmf1/includes/WikiMap.php
===================================================================
--- branches/wmf/1.17wmf1/includes/WikiMap.php 2011-08-31 19:09:40 UTC (rev
95900)
+++ branches/wmf/1.17wmf1/includes/WikiMap.php 2011-08-31 19:15:33 UTC (rev
95901)
@@ -18,7 +18,7 @@
list( $major, $minor ) = $wgConf->siteFromDB( $wikiID );
if( isset( $major ) ) {
- $server = $wgConf->get( 'wgServer', $wikiID, $major,
+ $server = $wgConf->get( 'wgCanonicalServer', $wikiID,
$major,
array( 'lang' => $minor, 'site' => $major ) );
$path = $wgConf->get( 'wgArticlePath', $wikiID, $major,
array( 'lang' => $minor, 'site' => $major ) );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs