summaryrefslogtreecommitdiff
path: root/includes/SquidPurgeClient.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-12-20 09:00:55 +0100
committerPierre Schmitz <pierre@archlinux.de>2015-12-20 09:00:55 +0100
commita2190ac74dd4d7080b12bab90e552d7aa81209ef (patch)
tree8b31f38de9882d18df54cf8d9e0de74167a094eb /includes/SquidPurgeClient.php
parent15e69f7b20b6596b9148030acce5b59993b95a45 (diff)
parent257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff)
Merge branch 'mw-1.26'
Diffstat (limited to 'includes/SquidPurgeClient.php')
-rw-r--r--includes/SquidPurgeClient.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/SquidPurgeClient.php b/includes/SquidPurgeClient.php
index 824dd06b..ca8f11ae 100644
--- a/includes/SquidPurgeClient.php
+++ b/includes/SquidPurgeClient.php
@@ -95,9 +95,9 @@ class SquidPurgeClient {
}
$this->socket = socket_create( AF_INET, SOCK_STREAM, SOL_TCP );
socket_set_nonblock( $this->socket );
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$ok = socket_connect( $this->socket, $ip, $this->port );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( !$ok ) {
$error = socket_last_error( $this->socket );
if ( $error !== self::EINPROGRESS ) {
@@ -153,12 +153,12 @@ class SquidPurgeClient {
} elseif ( IP::isIPv6( $this->host ) ) {
throw new MWException( '$wgSquidServers does not support IPv6' );
} else {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$this->ip = gethostbyname( $this->host );
if ( $this->ip === $this->host ) {
$this->ip = false;
}
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
}
}
return $this->ip;
@@ -178,11 +178,11 @@ class SquidPurgeClient {
*/
public function close() {
if ( $this->socket ) {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
socket_set_block( $this->socket );
socket_shutdown( $this->socket );
socket_close( $this->socket );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
}
$this->socket = null;
$this->readBuffer = '';
@@ -252,9 +252,9 @@ class SquidPurgeClient {
$buf = substr( $this->writeBuffer, 0, self::BUFFER_SIZE );
$flags = 0;
}
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$bytesSent = socket_send( $socket, $buf, strlen( $buf ), $flags );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $bytesSent === false ) {
$error = socket_last_error( $socket );
@@ -278,9 +278,9 @@ class SquidPurgeClient {
}
$buf = '';
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$bytesRead = socket_recv( $socket, $buf, self::BUFFER_SIZE, 0 );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $bytesRead === false ) {
$error = socket_last_error( $socket );
if ( $error != self::EAGAIN && $error != self::EINTR ) {
@@ -442,9 +442,9 @@ class SquidPurgeClientPool {
}
$exceptSockets = null;
$timeout = min( $startTime + $this->timeout - microtime( true ), 1 );
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$numReady = socket_select( $readSockets, $writeSockets, $exceptSockets, $timeout );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $numReady === false ) {
wfDebugLog( 'squid', __METHOD__ . ': Error in stream_select: ' .
socket_strerror( socket_last_error() ) . "\n" );