Update RELEASE-NOTES-1.34 for various backports
[lhc/web/wiklou.git] / includes / Pingback.php
index 8d7c3b6..3b0ab2b 100644 (file)
@@ -22,6 +22,7 @@
 
 use Psr\Log\LoggerInterface;
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Send information about this MediaWiki instance to MediaWiki.org.
@@ -195,7 +196,7 @@ class Pingback {
                                        'updatelog',
                                        [ 'ul_key' => 'PingBack', 'ul_value' => $id ],
                                        __METHOD__,
-                                       'IGNORE'
+                                       [ 'IGNORE' ]
                                );
 
                                if ( !$dbw->affectedRows() ) {
@@ -229,7 +230,7 @@ class Pingback {
                $json = FormatJson::encode( $data );
                $queryString = rawurlencode( str_replace( ' ', '\u0020', $json ) ) . ';';
                $url = 'https://www.mediawiki.org/beacon/event?' . $queryString;
-               return Http::post( $url ) !== false;
+               return MediaWikiServices::getInstance()->getHttpRequestFactory()->post( $url ) !== null;
        }
 
        /**