r95014 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95013‎ | r95014 | r95015 >
Date:17:20, 19 August 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Use getInternalUrl() instead of getFullUrl() in purgeList.php . This was potentially a serious bug if $wgServer differed from $wgInternalServer in command-line mode (this is not the case on WMF, but might be the case on 3rd-party installs)
Modified paths:
  • /trunk/phase3/maintenance/purgeList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/purgeList.php
@@ -52,7 +52,7 @@
5353 } elseif ( $page !== '' ) {
5454 $title = Title::newFromText( $page );
5555 if ( $title ) {
56 - $url = $title->getFullUrl();
 56+ $url = $title->getInternalUrl();
5757 $this->output( "$url\n" );
5858 $urls[] = $url;
5959 if ( $this->getOption( 'purge' ) ) {
@@ -105,7 +105,7 @@
106106 $urls = array();
107107 foreach( $result as $row ) {
108108 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
109 - $url = $title->getFullUrl();
 109+ $url = $title->getInternalUrl();
110110 $urls[] = $url;
111111 }
112112

Follow-up revisions

RevisionCommit summaryAuthorDate
r955051.17wmf1: Merge a truckload of HTTPS / prot rel URL fixes: r93847, r94990, r9...catrope19:32, 25 August 2011
r964851.18: MFT protocol-relative URL saga: r95014, r95016, r95017, r95627, r95651,...catrope20:14, 7 September 2011

Comments

#Comment by Hashar (talk | contribs)   17:04, 28 August 2011

good catch :)

#Comment by Hashar (talk | contribs)   17:04, 28 August 2011

good catch :)

Status & tagging log