r83513 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83512‎ | r83513 | r83514 >
Date:06:40, 8 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
MFT r83512: fix squid purges from runJobs.php, were using http://localhost
Modified paths:
  • /branches/wmf/1.17wmf1/includes/DefaultSettings.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/SquidUpdate.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/Title.php
@@ -985,8 +985,9 @@
986986 * @return \type{\string} the URL
987987 */
988988 public function getInternalURL( $query = '', $variant = false ) {
989 - global $wgInternalServer;
990 - $url = $wgInternalServer . $this->getLocalURL( $query, $variant );
 989+ global $wgInternalServer, $wgServer;
 990+ $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer;
 991+ $url = $server . $this->getLocalURL( $query, $variant );
991992 wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) );
992993 return $url;
993994 }
Property changes on: branches/wmf/1.17wmf1/includes/Title.php
___________________________________________________________________
Modified: svn:mergeinfo
994995 Merged /trunk/phase3/includes/Title.php:r83512
Index: branches/wmf/1.17wmf1/includes/DefaultSettings.php
@@ -1712,7 +1712,7 @@
17131713 * $wgInternalServer = 'http://yourinternal.tld:8000';
17141714 * </code>
17151715 */
1716 -$wgInternalServer = $wgServer;
 1716+$wgInternalServer = false;
17171717
17181718 /**
17191719 * Cache timeout for the squid, will be sent as s-maxage (without ESI) or
Property changes on: branches/wmf/1.17wmf1/includes/DefaultSettings.php
___________________________________________________________________
Modified: svn:mergeinfo
17201720 Merged /trunk/phase3/includes/DefaultSettings.php:r83512
Index: branches/wmf/1.17wmf1/includes/SquidUpdate.php
@@ -193,9 +193,10 @@
194194 * @return string
195195 */
196196 static function expand( $url ) {
197 - global $wgInternalServer;
198 - if( $url != '' && $url{0} == '/' ) {
199 - return $wgInternalServer . $url;
 197+ global $wgInternalServer, $wgServer;
 198+ $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer;
 199+ if( $url !== '' && $url[0] == '/' ) {
 200+ return $server . $url;
200201 }
201202 return $url;
202203 }
Property changes on: branches/wmf/1.17wmf1/includes/SquidUpdate.php
___________________________________________________________________
Added: svn:mergeinfo
203204 Merged /branches/new-installer/phase3/includes/SquidUpdate.php:r43664-66004
204205 Merged /branches/wmf-deployment/includes/SquidUpdate.php:r53381,60970
205206 Merged /branches/REL1_15/phase3/includes/SquidUpdate.php:r51646
206207 Merged /branches/wmf/1.16wmf4/includes/SquidUpdate.php:r67177,69199,76243,77266
207208 Merged /branches/sqlite/includes/SquidUpdate.php:r58211-58321
208209 Merged /trunk/phase3/includes/SquidUpdate.php:r83512

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83512Set $wgInternalServer to false by default, and fall back to $wgServer in the ...tstarling06:38, 8 March 2011

Status & tagging log