r95901 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95900‎ | r95901 | r95902 >
Date:19:15, 31 August 2011
Author:catrope
Status:resolved (Comments)
Tags:
Comment:
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 (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ActiveAbstract/AbstractFilter.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ActiveAbstract/GoogleCoopFilter.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CodeReview/tests/CodeReviewTest.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/Collection/Collection.body.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/Collection/Collection.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContributionTracking/ContributionTracking.processor.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingAPITest.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingProcessorTest.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingTest.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/EmailCapture/api/ApiEmailCapture.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/NewMessagesController.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/OpenSearchXml/ApiOpenSearchXml.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/SecurePoll/includes/entities/Election.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/SecurePoll/includes/user/Auth.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrixApi.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrix_body.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/Title.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/WikiMap.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/View.php
@@ -156,7 +156,13 @@
157157
158158 return $title->getFullURL( $query );
159159 }
 160+
 161+ static function linkInContextCanonicalURL( $thread, $contextType = 'page' ) {
 162+ list( $title, $query ) = self::linkInContextData( $thread, $contextType );
160163
 164+ return $title->getCanonicalURL( $query );
 165+ }
 166+
161167 static function diffQuery( $thread, $revision ) {
162168 $changed_thread = $revision->getChangeObject();
163169 $curr_rev_id = $changed_thread->rootRevision();
Index: branches/wmf/1.17wmf1/extensions/LiquidThreads/classes/NewMessagesController.php
@@ -307,7 +307,7 @@
308308 global $wgPasswordSender;
309309 $link_title = clone $t->getTitle();
310310 $link_title->setFragment( '#' . $t->getAnchorName() );
311 - $permalink = LqtView::linkInContextURL( $t );
 311+ $permalink = LqtView::linkInContextCanonicalURL( $t );
312312 $talkPage = $t->getTitle()->getPrefixedText();
313313 $from = new MailAddress( $wgPasswordSender, 'WikiAdmin' );
314314 $threadSubject = $t->subject();
Index: branches/wmf/1.17wmf1/extensions/AbuseFilter/AbuseFilter.class.php
@@ -1700,12 +1700,12 @@
17011701 static function modifyActionText( $page, $type, $title, $sk, $args ) {
17021702 list( $history_id, $filter_id ) = $args;
17031703
1704 - $filter_link = $sk ? $sk->link( $title ) : $title->getFullURL();
 1704+ $filter_link = $sk ? $sk->link( $title ) : $title->getCanonicalURL();
17051705
17061706 $details_title = SpecialPage::getTitleFor( 'AbuseFilter', "history/$filter_id/diff/prev/$history_id" );
17071707 $details_text = wfMsgExt( 'abusefilter-log-detailslink', 'parseinline' );
17081708 $details_link =
1709 - $sk ? $sk->link( $details_title, $details_text ) : $details_title->getFullURL();
 1709+ $sk ? $sk->link( $details_title, $details_text ) : $details_title->getCanonicalURL();
17101710
17111711 return wfMsgExt( 'abusefilter-log-entry-modify',
17121712 array( 'parseinline', 'replaceafter' ), array( $filter_link, $details_link ) );
Index: branches/wmf/1.17wmf1/extensions/OpenSearchXml/ApiOpenSearchXml.php
@@ -103,11 +103,11 @@
104104
105105 $item['Text']['*'] = $title->getPrefixedText();
106106 $item['Description']['*'] = $extract;
107 - $item['Url']['*'] = $title->getFullUrl();
 107+ $item['Url']['*'] = wfExpandUrl( $title->getFullUrl(), PROTO_CURRENT );
108108 if( $image ) {
109109 $thumb = $image->transform( array( 'width' => 50, 'height' => 50 ), 0 );
110110 $item['Image'] = array(
111 - 'source' => wfExpandUrl( $thumb->getUrl() ),
 111+ 'source' => wfExpandUrl( $thumb->getUrl(), PROTO_CURRENT ),
112112 //alt
113113 'width' => $thumb->getWidth(),
114114 'height' => $thumb->getHeight() );
Index: branches/wmf/1.17wmf1/extensions/Collection/Collection.php
@@ -219,12 +219,12 @@
220220 $r = new AjaxResponse();
221221 if ( $redirect ) {
222222 $title = Title::newFromText( $redirect );
223 - $redirecturl = $title->getFullURL();
 223+ $redirecturl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
224224 $r->setResponseCode( 302 );
225225 header( 'Location: ' . $redirecturl );
226226 } else {
227227 $title = SpecialPage::getTitleFor( 'Book' );
228 - $redirecturl = $title->getFullURL();
 228+ $redirecturl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
229229 $r->setContentType( 'application/json' );
230230 $r->addText( $json->encode( array( 'redirect_url' => $redirecturl ) ) );
231231 }
Index: branches/wmf/1.17wmf1/extensions/Collection/Collection.body.php
@@ -581,7 +581,7 @@
582582 'revision' => strval( $oldid ),
583583 'latest' => strval( $latest ),
584584 'timestamp' => wfTimestamp( TS_UNIX, $revision->mTimestamp ),
585 - 'url' => $title->getFullURL(),
 585+ 'url' => $title->getCanonicalURL(),
586586 'currentVersion' => $currentVersion,
587587 );
588588
@@ -766,7 +766,7 @@
767767 'latest' => $latest,
768768 'revision' => $oldid,
769769 'timestamp' => wfTimestamp( TS_UNIX, $revision->mTimestamp ),
770 - 'url' => $articleTitle->getFullURL(),
 770+ 'url' => $articleTitle->getCanonicalURL(),
771771 'currentVersion' => $currentVersion,
772772 );
773773 if ( $displayTitle ) {
@@ -956,7 +956,7 @@
957957
958958 $response = self::mwServeCommand( 'render', array(
959959 'metabook' => $this->buildJSONCollection( $collection ),
960 - 'base_url' => wfExpandUrl( $wgScriptPath ),
 960+ 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CANONICAL ),
961961 'script_extension' => $wgScriptExtension,
962962 'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ),
963963 'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ),
@@ -989,7 +989,7 @@
990990
991991 $response = self::mwServeCommand( 'render', array(
992992 'collection_id' => $collectionID,
993 - 'base_url' => wfExpandUrl( $wgScriptPath ),
 993+ 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CANONICAL ),
994994 'script_extension' => $wgScriptExtension,
995995 'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ),
996996 'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ),
@@ -1071,7 +1071,7 @@
10721072 $wgOut->setPageTitle( wfMsg( 'coll-rendering_finished_title' ) );
10731073
10741074 $template = new CollectionFinishedTemplate();
1075 - $template->set( 'download_url', wfExpandUrl( SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=download&' . $query ) ) );
 1075+ $template->set( 'download_url', wfExpandUrl( SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=download&' . $query ), PROTO_CURRENT ) );
10761076 $template->set( 'is_cached', $wgRequest->getVal( 'is_cached' ) );
10771077 $template->set( 'query', $query );
10781078 $template->set( 'return_to', $return_to );
@@ -1161,7 +1161,7 @@
11621162
11631163 $response = self::mwServeCommand( 'zip_post', array(
11641164 'metabook' => $this->buildJSONCollection( $collection ),
1165 - 'base_url' => wfExpandUrl( $wgScriptPath ),
 1165+ 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CANONICAL ),
11661166 'script_extension' => $wgScriptExtension,
11671167 'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ),
11681168 'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ),
@@ -1282,7 +1282,7 @@
12831283 curl_setopt( $c, CURLOPT_HTTPHEADER, array( 'Expect:' ) );
12841284 curl_setopt( $c, CURLOPT_HEADER, false );
12851285 if ( is_object( $wgTitle ) ) {
1286 - curl_setopt( $c, CURLOPT_REFERER, $wgTitle->getFullURL() );
 1286+ curl_setopt( $c, CURLOPT_REFERER, wfExpandUrl( $wgTitle->getFullURL(), PROTO_CURRENT ) );
12871287 }
12881288 if ( $timeout ) {
12891289 curl_setopt( $c, CURLOPT_TIMEOUT, $wgHTTPTimeout );
Index: branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php
@@ -550,7 +550,7 @@
551551
552552 function baseUrl() {
553553 $title =& SpecialPage::getTitleFor( 'OAIRepository' );
554 - return $title->getFullUrl();
 554+ return $title->getCanonicalUrl();
555555 }
556556
557557 function earliestDatestamp() {
@@ -831,7 +831,7 @@
832832 oaiTag( 'dc:language', array(), $wgContLanguageCode ) . "\n" .
833833 oaiTag( 'dc:type', array(), 'Text' ) . "\n" .
834834 oaiTag( 'dc:format', array(), $wgMimeType ) . "\n" .
835 - oaiTag( 'dc:identifier', array(), $title->getFullUrl() ) . "\n" .
 835+ oaiTag( 'dc:identifier', array(), $title->getCanonicalUrl() ) . "\n" .
836836 oaiTag( 'dc:contributor', array(), $this->_row->rev_user_text ) . "\n" .
837837 oaiTag( 'dc:date', array(), oaiDatestamp( $this->getDatestamp() ) ) . "\n" .
838838 "</oai_dc:dc>\n";
Index: branches/wmf/1.17wmf1/extensions/SecurePoll/includes/entities/Election.php
@@ -363,7 +363,7 @@
364364 Xml::element( 'auth', array(), 'local' ) . "\n" .
365365 Xml::element( 'property',
366366 array( 'name' => 'jump-url' ),
367 - $this->context->getSpecialTitle()->getFullURL()
 367+ $this->context->getSpecialTitle()->getCanonicalUrl()
368368 ) . "\n" .
369369 Xml::element( 'property',
370370 array( 'name' => 'jump-id' ),
Index: branches/wmf/1.17wmf1/extensions/SecurePoll/includes/user/Auth.php
@@ -205,7 +205,7 @@
206206 'name' => $user->getName(),
207207 'type' => 'local',
208208 'domain' => preg_replace( '!.*/(.*)$!', '$1', $wgServer ),
209 - 'url' => $user->getUserPage()->getFullURL(),
 209+ 'url' => $user->getUserPage()->getCanonicalURL(),
210210 'properties' => array(
211211 'wiki' => wfWikiID(),
212212 'blocked' => $user->isBlocked(),
Index: branches/wmf/1.17wmf1/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -36,7 +36,7 @@
3737 }
3838 }
3939
40 - $thisHttp = $title->getFullUrl( 'action=raw' );
 40+ $thisHttp = wfExpandUrl( $title->getFullUrl( 'action=raw' ), PROTO_HTTP );
4141 $thisHttpRegex = '/^' . preg_quote( $thisHttp, '/' ) . '(?:&.*)?$/';
4242
4343 foreach( $this->files as $fileName ) {
Index: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
@@ -53,7 +53,7 @@
5454 $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-view-logs' ) );
5555 $htmlOut .= Xml::openElement( 'div', array( 'id' => 'cn-log-switcher' ) );
5656 $title = SpecialPage::getTitleFor( 'CentralNoticeLogs' );
57 - $fullUrl = $title->getFullUrl();
 57+ $fullUrl = wfExpandUrl( $title->getFullUrl(), PROTO_CURRENT );
5858
5959 $htmlOut .= Xml::radio(
6060 'log_type',
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php
___________________________________________________________________
Modified: svn:mergeinfo
6161 Merged /trunk/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:r95652-95653,95656,95659,95663,95855
6262 Merged /trunk/phase3/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php:r95627,95651
Index: branches/wmf/1.17wmf1/extensions/ActiveAbstract/AbstractFilter.php
@@ -55,7 +55,7 @@
5656
5757 $xml = "<doc>\n";
5858 $xml .= Xml::element( 'title', null, $this->_variant( $title ) ) . "\n";
59 - $xml .= Xml::element( 'url', null, $this->title->getFullUrl() ) . "\n";
 59+ $xml .= Xml::element( 'url', null, $this->title->getCanonicalUrl() ) . "\n";
6060
6161 // add abstract and links when we have revision data...
6262 $this->revision = null;
@@ -214,7 +214,7 @@
215215 $stripped = $this->_stripMarkup( $inside ); // strip internal markup and <h[1-6]>
216216 $header = UtfNormal::cleanUp( $stripped );
217217 $anchor = EditPage::sectionAnchor( $header );
218 - $url = $this->title->getFullUrl() . $anchor;
 218+ $url = $this->title->getCanonicalUrl() . $anchor;
219219 $headers[$header] = $url;
220220 }
221221 return $headers;
@@ -237,7 +237,7 @@
238238 $links = array();
239239 while ( $row = $dbr->fetchObject( $result ) ) {
240240 $category = Title::makeTitle( NS_CATEGORY, $row->cl_to );
241 - $links[$category->getText()] = $category->getFullUrl();
 241+ $links[$category->getText()] = $category->getCanonicalUrl();
242242 }
243243 $dbr->freeResult( $result );
244244
Index: branches/wmf/1.17wmf1/extensions/ActiveAbstract/GoogleCoopFilter.php
@@ -72,7 +72,7 @@
7373 $xml .= ' ' . Xml::element( 'Output', array( 'name' => 'title' ),
7474 $wgSitename . ':' . $this->title->getPrefixedText() ) . "\n";
7575 $xml .= ' ' . Xml::element( 'Output', array( 'name' => 'more_url' ),
76 - $this->title->getFullUrl() ) . "\n";
 76+ $this->title->getCanonicalUrl() ) . "\n";
7777
7878 // add abstract and links when we have revision data...
7979 $this->revision = null;
Index: branches/wmf/1.17wmf1/extensions/EmailCapture/api/ApiEmailCapture.php
@@ -33,8 +33,8 @@
3434 // Send auto-response
3535 global $wgUser, $wgEmailCaptureSendAutoResponse, $wgEmailCaptureAutoResponse;
3636 $title = SpecialPage::getTitleFor( 'EmailCapture' );
37 - $link = $title->getFullURL();
38 - $fullLink = $title->getFullURL( array( 'verify' => $code ) );
 37+ $link = $title->getCanonicalURL();
 38+ $fullLink = $title->getCanonicalURL( array( 'verify' => $code ) );
3939 if ( $wgEmailCaptureSendAutoResponse ) {
4040 UserMailer::send(
4141 new MailAddress( $params['email'] ),
Index: branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrixApi.php
@@ -46,7 +46,7 @@
4747 if ( $matrix->exist( $lang, $site ) ) {
4848 $url = $matrix->getUrl( $lang, $site );
4949 $site_out = array(
50 - 'url' => wfExpandUrl( $url ),
 50+ 'url' => $url,
5151 'code' => $site,
5252 );
5353 if( $matrix->isClosed( $lang, $site ) ) {
@@ -68,7 +68,7 @@
6969 $url = $matrix->getUrl( $lang, $site );
7070
7171 $wiki = array();
72 - $wiki['url'] = wfExpandUrl( $url );
 72+ $wiki['url'] = $url;
7373 $wiki['code'] = str_replace( '_', '-', $lang ) . ( $site != 'wiki' ? $site : '' );
7474
7575 if( $matrix->isPrivate( $lang . $site ) ) {
Index: branches/wmf/1.17wmf1/extensions/SiteMatrix/SiteMatrix_body.php
@@ -131,7 +131,7 @@
132132 global $wgConf;
133133 $dbname = $minor . $major;
134134 $minor = str_replace( '_', '-', $minor );
135 - return $wgConf->get( 'wgServer', $dbname, $major,
 135+ return $wgConf->get( 'wgCanonicalServer', $dbname, $major,
136136 array( 'lang' => $minor, 'site' => $major ) );
137137 }
138138
Index: branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
@@ -439,13 +439,13 @@
440440 );
441441
442442 // Get repo and build comment title (for url)
443 - $url = $this->getFullUrl();
 443+ $url = $this->getCanonicalUrl();
444444
445445 foreach ( $res as $row ) {
446446 $revision = CodeRevision::newFromRow( $this->repo, $row );
447447 $users = $revision->getCommentingUsers();
448448
449 - $rowUrl = $revision->getFullUrl();
 449+ $rowUrl = $revision->getCanonicalUrl();
450450
451451 $revisionAuthor = $revision->getWikiUser();
452452
@@ -623,7 +623,7 @@
624624 $commentId = $dbw->insertId();
625625 $dbw->commit();
626626
627 - $url = $this->getFullUrl( $commentId );
 627+ $url = $this->getCanonicalUrl( $commentId );
628628
629629 $this->sendCommentToUDP( $commentId, $text, $url );
630630
@@ -1238,10 +1238,12 @@
12391239 }
12401240
12411241 /**
 1242+ * Get the canonical URL of a revision. Constructs a Title for this revision
 1243+ * along the lines of [[Special:Code/RepoName/12345#c678]] and calls getCanonicalUrl().
12421244 * @param string $commentId
12431245 * @return \type
12441246 */
1245 - public function getFullUrl( $commentId = 0 ) {
 1247+ public function getCanonicalUrl( $commentId = 0 ) {
12461248 $title = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $this->id );
12471249
12481250 # Append comment id if not null, empty string or zero
@@ -1249,7 +1251,7 @@
12501252 $title->setFragment( "#c{$commentId}" );
12511253 }
12521254
1253 - return $title->getFullUrl();
 1255+ return $title->getCanonicalUrl();
12541256 }
12551257
12561258 /**
@@ -1263,7 +1265,7 @@
12641266
12651267 if( $wgCodeReviewUDPAddress ) {
12661268 if( is_null( $url ) ) {
1267 - $url = $this->getFullUrl( $commentId );
 1269+ $url = $this->getCanonicalUrl( $commentId );
12681270 }
12691271
12701272 $line = wfMsg( 'code-rev-message' ) . " \00314(" . $this->repo->getName() .
@@ -1282,7 +1284,7 @@
12831285 global $wgCodeReviewUDPAddress, $wgCodeReviewUDPPort, $wgCodeReviewUDPPrefix, $wgUser;
12841286
12851287 if( $wgCodeReviewUDPAddress ) {
1286 - $url = $this->getFullUrl();
 1288+ $url = $this->getCanonicalUrl();
12871289
12881290 $line = wfMsg( 'code-rev-status' ) . " \00314(" . $this->repo->getName() .
12891291 ")\00303 " . RecentChange::cleanupForIRC( $wgUser->getName() ) . "\003 " .
Property changes on: branches/wmf/1.17wmf1/extensions/CodeReview/backend/CodeRevision.php
___________________________________________________________________
Modified: svn:mergeinfo
12901292 Merged /trunk/extensions/CodeReview/backend/CodeRevision.php:r95652-95653,95656,95659,95663,95855
12911293 Merged /trunk/phase3/extensions/CodeReview/backend/CodeRevision.php:r95627,95651
Index: branches/wmf/1.17wmf1/extensions/CodeReview/tests/CodeReviewTest.php
@@ -40,4 +40,28 @@
4141
4242 // $this->assertEquals( '', $formatter->link( '' ) );
4343 }
44 -}
\ No newline at end of file
 44+}
 45+ public function testCommentCanonicalUrl() {
 46+ # Fixture:
 47+ $repo = $this->createRepo();
 48+ $cr = CodeRevision::newFromSvn( $repo, array(
 49+ 'rev' => 305,
 50+ 'author' => 'hashar',
 51+ 'date' => '15 august 2011',
 52+ 'msg' => 'dumb revision message',
 53+ 'paths' => array( '/dev/null' ),
 54+ )
 55+ );
 56+
 57+ # Find out our revision root URL
 58+ $baseUrl = SpecialPage::getTitleFor( 'Code', $repo->getName().'/305' )->getCanonicalUrl();
 59+
 60+ # Test revision URL with various comment id:
 61+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( '' ) );
 62+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( 0 ) );
 63+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( null ) );
 64+ $this->assertEquals( $baseUrl, $cr->getCanonicalUrl( "0" ) );
 65+ $this->assertEquals( $baseUrl . '#c777', $cr->getCanonicalUrl( 777 ) );
 66+ $this->assertEquals( $baseUrl . '#c777', $cr->getCanonicalUrl( "777" ) );
 67+ }
 68+}
Index: branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php
@@ -117,7 +117,7 @@
118118 $dbw->commit();
119119
120120 if ( $statusChanged || $commentAdded ) {
121 - $url = $this->mRev->getFullUrl( $commentId );
 121+ $url = $this->mRev->getCanonicalUrl( $commentId );
122122 if ( $statusChanged && $commentAdded ) {
123123 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj4', 'codereview-email-body4',
124124 $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(),
Index: branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingAPITest.php
@@ -90,7 +90,7 @@
9191 'business' => 'donations@wikimedia.org',
9292 'item_number' => 'DONATE',
9393 'no_note' => 0,
94 - 'return' => $returnTitle->getFullUrl(),
 94+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
9595 'currency_code' => 'USD',
9696 'cmd' => '_xclick',
9797 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -124,7 +124,7 @@
125125 'business' => 'donations@wikimedia.org',
126126 'item_number' => 'DONATE',
127127 'no_note' => 0,
128 - 'return' => $returnTitle->getFullUrl(),
 128+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
129129 'currency_code' => 'USD',
130130 'cmd' => '_xclick',
131131 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -171,7 +171,7 @@
172172 'business' => 'donations@wikimedia.org',
173173 'item_number' => 'DONATE',
174174 'no_note' => 0,
175 - 'return' => $returnTitle->getFullUrl(), //Important to the language test.
 175+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ), //Important to the language test.
176176 'currency_code' => 'USD',
177177 'cmd' => '_xclick',
178178 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -209,7 +209,7 @@
210210 'business' => 'donations@wikimedia.org',
211211 'item_number' => 'DONATE',
212212 'no_note' => 0,
213 - 'return' => $returnTitle->getFullUrl(),
 213+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
214214 'currency_code' => 'USD',
215215 'cmd' => '_xclick',
216216 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
Index: branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingProcessorTest.php
@@ -196,7 +196,7 @@
197197 'business' => 'donations@wikimedia.org',
198198 'item_number' => 'DONATE',
199199 'no_note' => 0,
200 - 'return' => $returnTitle->getFullUrl(),
 200+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
201201 'currency_code' => 'USD',
202202 'cmd' => '_xclick',
203203 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -261,7 +261,7 @@
262262 'business' => 'donations@wikimedia.org',
263263 'item_number' => 'DONATE',
264264 'no_note' => 0,
265 - 'return' => $returnTitle->getFullURL(), //Important to the language test.
 265+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ), //Important to the language test.
266266 'currency_code' => 'USD',
267267 'cmd' => '_xclick',
268268 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -288,7 +288,7 @@
289289 'business' => 'donations@wikimedia.org',
290290 'item_number' => 'DONATE',
291291 'no_note' => 0,
292 - 'return' => $returnTitle->getFullURL(),
 292+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
293293 'currency_code' => 'USD',
294294 'cmd' => '_xclick',
295295 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
Index: branches/wmf/1.17wmf1/extensions/ContributionTracking/tests/ContributionTrackingTest.php
@@ -113,7 +113,7 @@
114114 'business' => 'donations@wikimedia.org',
115115 'item_number' => 'DONATE',
116116 'no_note' => 0,
117 - 'return' => $returnTitle->getFullUrl(),
 117+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
118118 'currency_code' => 'USD',
119119 'cmd' => '_xclick',
120120 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -147,7 +147,7 @@
148148 'business' => 'donations@wikimedia.org',
149149 'item_number' => 'DONATE',
150150 'no_note' => 0,
151 - 'return' => $returnTitle->getFullUrl(),
 151+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
152152 'currency_code' => 'USD',
153153 'cmd' => '_xclick',
154154 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -194,7 +194,7 @@
195195 'business' => 'donations@wikimedia.org',
196196 'item_number' => 'DONATE',
197197 'no_note' => 0,
198 - 'return' => $returnTitle->getFullUrl(), //Important to the language test.
 198+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ), //Important to the language test.
199199 'currency_code' => 'USD',
200200 'cmd' => '_xclick',
201201 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
@@ -233,7 +233,7 @@
234234 'business' => 'donations@wikimedia.org',
235235 'item_number' => 'DONATE',
236236 'no_note' => 0,
237 - 'return' => $returnTitle->getFullUrl(),
 237+ 'return' => wfExpandUrl( $returnTitle->getFullUrl(), PROTO_HTTP ),
238238 'currency_code' => 'USD',
239239 'cmd' => '_xclick',
240240 'notify_url' => 'https://civicrm.wikimedia.org/fundcore_gateway/paypal',
Index: branches/wmf/1.17wmf1/extensions/ContributionTracking/ContributionTracking.processor.php
@@ -322,7 +322,7 @@
323323 $returnText = $input['return'];
324324 $returnTitle = Title::newFromText( $returnText );
325325 if ( $returnTitle ) {
326 - $returnto = $returnTitle->getFullUrl();
 326+ $returnto = wfExpandUrl( $returnTitle->getFullUrl(), PROTO_CURRENT );
327327 } else {
328328 $returnto = $wgContributionTrackingReturnToURLDefault . "/$language";
329329 }
Index: branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
@@ -1179,8 +1179,7 @@
11801180 protected static function getIRCLine( $userpage, $wikiID ) {
11811181 $title = RecentChange::cleanupForIRC( $userpage->getPrefixedText() );
11821182 $wikiID = RecentChange::cleanupForIRC( $wikiID );
1183 - // FIXME: *HACK* should be getFullURL(), hacked for SSL madness
1184 - $url = $userpage->getInternalURL();
 1183+ $url = $userpage->getCanonicalURL();
11851184 $user = RecentChange::cleanupForIRC( $userpage->getText() );
11861185 # see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003,
11871186 # no colour (\003) switches back to the term default
Property changes on: branches/wmf/1.17wmf1/extensions/CentralAuth/CentralAuthUser.php
___________________________________________________________________
Modified: svn:mergeinfo
11881187 Merged /trunk/extensions/CentralAuth/CentralAuthUser.php:r95652-95653,95656,95659,95663,95855
11891188 Merged /trunk/phase3/extensions/CentralAuth/CentralAuthUser.php:r95627,95651
Index: branches/wmf/1.17wmf1/includes/WikiMap.php
@@ -18,7 +18,7 @@
1919
2020 list( $major, $minor ) = $wgConf->siteFromDB( $wikiID );
2121 if( isset( $major ) ) {
22 - $server = $wgConf->get( 'wgServer', $wikiID, $major,
 22+ $server = $wgConf->get( 'wgCanonicalServer', $wikiID, $major,
2323 array( 'lang' => $minor, 'site' => $major ) );
2424 $path = $wgConf->get( 'wgArticlePath', $wikiID, $major,
2525 array( 'lang' => $minor, 'site' => $major ) );
Index: branches/wmf/1.17wmf1/includes/Title.php
@@ -1008,13 +1008,15 @@
10091009 * e-mail notifications. Uses $wgCanonicalServer and the
10101010 * GetCanonicalURL hook.
10111011 *
 1012+ * NOTE: Unlike getInternalURL(), the canonical URL includes the fragment
 1013+ *
10121014 * @param $query string An optional query string
10131015 * @param $variant string Language variant of URL (for sr, zh, ...)
10141016 * @return string The URL
10151017 */
10161018 public function getCanonicalURL( $query = '', $variant = false ) {
10171019 global $wgCanonicalServer;
1018 - $url = $wgCanonicalServer . $this->getLocalURL( $query, $variant );
 1020+ $url = $wgCanonicalServer . $this->getLocalURL( $query, $variant ) . $this->getFragmentForURL();
10191021 wfRunHooks( 'GetCanonicalURL', array( &$this, &$url, $query ) );
10201022 return $url;
10211023 }
Property changes on: branches/wmf/1.17wmf1/includes/Title.php
___________________________________________________________________
Modified: svn:mergeinfo
10221024 Merged /trunk/phase3/includes/Title.php:r95627,95651

Follow-up revisions

RevisionCommit summaryAuthorDate
r95902Fix syntax error in r95901. Pre-commit hook?catrope19:17, 31 August 2011
r959031.17wmf1: MFT r95894 for real this time, followup r95901catrope19:22, 31 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95627Fix bug in r94995: getCanonicalUrl() doesn't append the fragment. This is cor...catrope15:15, 28 August 2011
r95651In WikiMap, pull wgCanonicalServer from $wgConf instead of wgServer for build...catrope08:55, 29 August 2011
r95652Protocol-relative URL fixes for CentralAuth and SiteMatrix:...catrope09:00, 29 August 2011
r95653Protocol-relative URL fixes for Collection:...catrope09:17, 29 August 2011
r95656Rename CodeRevision::getFullUrl() to getCanonicalUrl(), make it behave accord...catrope12:25, 29 August 2011
r95659Switch to using canonical URLs where appropriate in various extensions...catrope12:33, 29 August 2011
r95663Last commit to make WMF-deployed extensions HTTPS-ready (hopefully): use wfEx...catrope14:37, 29 August 2011
r95855Followup r95663: per CR, use the current protocol for expanding the thumbnail...catrope12:09, 31 August 2011
r95894Followup r95002: unbreak getTokenUrl() by using a simpler hack that doesn't i...catrope18:08, 31 August 2011
r95899Fix misspelled constant in r95663catrope19:07, 31 August 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   19:20, 31 August 2011

I don't see the fix on User.php here (r95894 backport).

Status & tagging log