X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Ffilerepo%2FForeignAPIRepo.php;h=56ccc64499af9a0871bcddd8b5934882935be52e;hb=64b83bdb3afd0ee4f8fc1893a865409c198e601e;hp=ca417187e0ca72d8963599bb0b096508a8212a42;hpb=8bb5a6c461c31ee5ce6874548246fc2c520686f6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index ca417187e0..56ccc64499 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -528,7 +528,7 @@ class ForeignAPIRepo extends FileRepo { } $req = MWHttpRequest::factory( $url, $options, __METHOD__ ); - $req->setUserAgent( ForeignAPIRepo::getUserAgent() ); + $req->setUserAgent( self::getUserAgent() ); $status = $req->execute(); if ( $status->isOK() ) { @@ -571,7 +571,7 @@ class ForeignAPIRepo extends FileRepo { $cache = ObjectCache::getMainWANInstance(); return $cache->getWithSetCallback( - $this->getLocalCacheKey( get_class( $this ), $target, md5( $url ) ), + $this->getLocalCacheKey( static::class, $target, md5( $url ) ), $cacheTTL, function ( $curValue, &$ttl ) use ( $url, $cache ) { $html = self::httpGet( $url, 'default', [], $mtime ); @@ -593,13 +593,13 @@ class ForeignAPIRepo extends FileRepo { * @throws MWException */ function enumFiles( $callback ) { - throw new MWException( 'enumFiles is not supported by ' . get_class( $this ) ); + throw new MWException( 'enumFiles is not supported by ' . static::class ); } /** * @throws MWException */ protected function assertWritableRepo() { - throw new MWException( get_class( $this ) . ': write operations are not supported.' ); + throw new MWException( static::class . ': write operations are not supported.' ); } }