Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/224746
Change subject: Rename CurlMultiClient to ParsoidCurlMultiClient ...................................................................... Rename CurlMultiClient to ParsoidCurlMultiClient Per TODO comment. Change-Id: I5632ef7611fdddfc01576b8cdf4b76a9b1f06e26 --- M ParsoidCacheUpdateJob.php R ParsoidCurlMultiClient.php M extension.json 3 files changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/46/224746/1 diff --git a/ParsoidCacheUpdateJob.php b/ParsoidCacheUpdateJob.php index 6bfb082..68dc73d 100644 --- a/ParsoidCacheUpdateJob.php +++ b/ParsoidCacheUpdateJob.php @@ -86,9 +86,9 @@ } /** - * Check an array of CurlMultiClient results for errors, and setLastError + * Check an array of ParsoidCurlMultiClient results for errors, and setLastError * if there are any. - * @param $results CurlMultiClient result array + * @param $results ParsoidCurlMultiClient result array */ protected function checkCurlResults( $results ) { foreach ( $results as $k => $result ) { @@ -126,7 +126,7 @@ ); } wfDebug( "ParsoidCacheUpdateJob::invalidateTitle: " . serialize( $requests ) . "\n" ); - $this->checkCurlResults( CurlMultiClient::request( $requests ) ); + $this->checkCurlResults( ParsoidCurlMultiClient::request( $requests ) ); # And now purge the previous revision so that we make efficient use of # the Varnish cache space without relying on LRU. Since the URL @@ -138,9 +138,9 @@ 'url' => $this->getParsoidURL( $title, $server, true ) ); } - $options = CurlMultiClient::getDefaultOptions(); + $options = ParsoidCurlMultiClient::getDefaultOptions(); $options[CURLOPT_CUSTOMREQUEST] = "PURGE"; - $this->checkCurlResults( CurlMultiClient::request( $requests, $options ) ); + $this->checkCurlResults( ParsoidCurlMultiClient::request( $requests, $options ) ); return $this->getLastError() == null; } @@ -191,7 +191,7 @@ } // Now send off all those update requests - $this->checkCurlResults( CurlMultiClient::request( $requests ) ); + $this->checkCurlResults( ParsoidCurlMultiClient::request( $requests ) ); wfDebug( 'ParsoidCacheUpdateJob::invalidateTitles update: ' . serialize( $requests ) . "\n" ); diff --git a/CurlMultiClient.php b/ParsoidCurlMultiClient.php similarity index 94% rename from CurlMultiClient.php rename to ParsoidCurlMultiClient.php index c6e7a0c..5f58148 100644 --- a/CurlMultiClient.php +++ b/ParsoidCurlMultiClient.php @@ -2,9 +2,8 @@ /** * A simple parallel CURL client helper class - * @TODO: name this ParsoidCurlMultiClient or move to core */ -class CurlMultiClient { +class ParsoidCurlMultiClient { /** * Get the default CURL options used for each request @@ -31,7 +30,7 @@ * 'headers' => array( 'X-Foo: Bar' ) * ) * @param $options array curl options used for each request, default - * {CurlMultiClient::getDefaultOptions}. + * {ParsoidCurlMultiClient::getDefaultOptions}. * @return array An array of arrays containing 'error' and 'data' * members. If there are errors, data will be null. If there are no * errors, the error member will be null and data will contain the @@ -45,7 +44,7 @@ $handles = array(); if ( $options === null ) { // add default options - $options = CurlMultiClient::getDefaultOptions(); + $options = ParsoidCurlMultiClient::getDefaultOptions(); } // add curl options to each handle diff --git a/extension.json b/extension.json index 5ddf51a..e10782a 100644 --- a/extension.json +++ b/extension.json @@ -27,7 +27,7 @@ "AutoloadClasses": { "ParsoidHooks": "Parsoid.hooks.php", "ParsoidCacheUpdateJob": "ParsoidCacheUpdateJob.php", - "CurlMultiClient": "CurlMultiClient.php" + "ParsoidCurlMultiClient": "ParsoidCurlMultiClient.php" }, "Hooks": { "ArticleEditUpdates": [ -- To view, visit https://gerrit.wikimedia.org/r/224746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5632ef7611fdddfc01576b8cdf4b76a9b1f06e26 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Tim Starling <tstarl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits