X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fclientpool%2FSquidPurgeClient.php;h=6b5482cf8d5d7583bd310114b99388a678cf3766;hb=dfec83932fd38a9086eb5a2e212889ad00f35b0e;hp=005b326f3ec884326288e6bc7d597ac8d018d614;hpb=ba88b2fbb0339664e43d8e8897ccd9df5fcb547d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/clientpool/SquidPurgeClient.php b/includes/clientpool/SquidPurgeClient.php index 005b326f3e..6b5482cf8d 100644 --- a/includes/clientpool/SquidPurgeClient.php +++ b/includes/clientpool/SquidPurgeClient.php @@ -25,7 +25,7 @@ * Uses asynchronous I/O, allowing purges to be done in a highly parallel * manner. * - * Could be replaced by curl_multi_exec() or some such. + * @todo Consider using MultiHttpClient. */ class SquidPurgeClient { /** @var string */ @@ -68,9 +68,8 @@ class SquidPurgeClient { /** * @param string $server - * @param array $options */ - public function __construct( $server, $options = [] ) { + public function __construct( $server ) { $parts = explode( ':', $server, 2 ); $this->host = $parts[0]; $this->port = $parts[1] ?? 80; @@ -151,7 +150,7 @@ class SquidPurgeClient { if ( IP::isIPv4( $this->host ) ) { $this->ip = $this->host; } elseif ( IP::isIPv6( $this->host ) ) { - throw new MWException( '$wgSquidServers does not support IPv6' ); + throw new MWException( '$wgCdnServers does not support IPv6' ); } else { Wikimedia\suppressWarnings(); $this->ip = gethostbyname( $this->host );