X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSquidPurgeClient.php;h=f5fd1950851e1b3707eea051aca9541d7c0c83db;hb=e05c4e9df06d68fcd43ce8eb888a0bea71b9dadf;hp=7d75f2ca9ae15d3284a033a1c8617f87b722dafd;hpb=31a52f9e3d49d452f4aef95491de7ad75ed4ccc3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SquidPurgeClient.php b/includes/SquidPurgeClient.php index 7d75f2ca9a..f5fd195085 100644 --- a/includes/SquidPurgeClient.php +++ b/includes/SquidPurgeClient.php @@ -293,7 +293,7 @@ class SquidPurgeClient { if ( count( $lines ) < 2 ) { return 'done'; } - if ( $this->readState == 'status' ) { + if ( $this->readState == 'status' ) { $this->processStatusLine( $lines[0] ); } else { // header $this->processHeaderLine( $lines[0] ); @@ -318,7 +318,7 @@ class SquidPurgeClient { return 'done'; } default: - throw new MWException( __METHOD__.': unexpected state' ); + throw new MWException( __METHOD__ . ': unexpected state' ); } } @@ -373,7 +373,7 @@ class SquidPurgeClient { * @param $msg string */ protected function log( $msg ) { - wfDebugLog( 'squid', __CLASS__." ($this->host): $msg\n" ); + wfDebugLog( 'squid', __CLASS__ . " ($this->host): $msg\n" ); } } @@ -429,14 +429,14 @@ class SquidPurgeClientPool { $numReady = socket_select( $readSockets, $writeSockets, $exceptSockets, $timeout ); wfRestoreWarnings(); if ( $numReady === false ) { - wfDebugLog( 'squid', __METHOD__.': Error in stream_select: ' . + wfDebugLog( 'squid', __METHOD__ . ': Error in stream_select: ' . socket_strerror( socket_last_error() ) . "\n" ); break; } // Check for timeout, use 1% tolerance since we aimed at having socket_select() // exit at precisely the overall timeout if ( microtime( true ) - $startTime > $this->timeout * 0.99 ) { - wfDebugLog( 'squid', __CLASS__.": timeout ({$this->timeout}s)\n" ); + wfDebugLog( 'squid', __CLASS__ . ": timeout ({$this->timeout}s)\n" ); break; } elseif ( !$numReady ) { continue;