Make CdnCacheUpdate::expand() private and update the sole caller

Change-Id: Id427a1667618b65055be772e9919052e95def1f9
This commit is contained in:
Aaron Schulz 2019-09-11 17:08:52 -07:00
parent d79186d085
commit fef9ed715a
2 changed files with 4 additions and 4 deletions

View file

@ -191,11 +191,11 @@ class SquidPurgeClient {
/**
* Queue a purge operation
*
* @param string $url
* @param string $url Fully expanded URL (with host and protocol)
*/
public function queuePurge( $url ) {
global $wgSquidPurgeUseHostHeader;
$url = CdnCacheUpdate::expand( str_replace( "\n", '', $url ) );
$url = str_replace( "\n", '', $url ); // sanity
$request = [];
if ( $wgSquidPurgeUseHostHeader ) {
$url = wfParseUrl( $url );

View file

@ -137,7 +137,7 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
foreach ( $chunks as $chunk ) {
$client = new SquidPurgeClient( $server );
foreach ( $chunk as $url ) {
$client->queuePurge( $url );
$client->queuePurge( self::expand( $url ) );
}
$pool->addClient( $client );
}
@ -254,7 +254,7 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
* @param string $url
* @return string
*/
public static function expand( $url ) {
private static function expand( $url ) {
return wfExpandUrl( $url, PROTO_INTERNAL );
}