From: Umherirrender Date: Sun, 30 Sep 2018 14:52:06 +0000 (+0200) Subject: Fix caller name in File::getDescriptionText X-Git-Tag: 1.34.0-rc.0~3951 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=e89bcc78cb227ebdc054f74fe20e0e45d59fe2e6;p=lhc%2Fweb%2Fwiklou.git Fix caller name in File::getDescriptionText Seeing {closure} in the logs as caller is not helpful Change-Id: I415e2bb691650bc34adfb750c7a70a5d29176849 --- diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 5a0cf6a621..a30d213851 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -2071,13 +2071,14 @@ abstract class File implements IDBAccessObject { $lang->getCode(), md5( $this->getName() ) ); + $fname = __METHOD__; return $cache->getWithSetCallback( $key, $this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE, - function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl ) { + function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) { wfDebug( "Fetching shared description from $renderUrl\n" ); - $res = Http::get( $renderUrl, [], __METHOD__ ); + $res = Http::get( $renderUrl, [], $fname ); if ( !$res ) { $ttl = WANObjectCache::TTL_UNCACHEABLE; } diff --git a/includes/filerepo/file/ForeignDBFile.php b/includes/filerepo/file/ForeignDBFile.php index ee4df1d351..1869967fc3 100644 --- a/includes/filerepo/file/ForeignDBFile.php +++ b/includes/filerepo/file/ForeignDBFile.php @@ -152,6 +152,7 @@ class ForeignDBFile extends LocalFile { } $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $fname = __METHOD__; return $cache->getWithSetCallback( $this->repo->getLocalCacheKey( @@ -161,9 +162,9 @@ class ForeignDBFile extends LocalFile { $touched ), $this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE, - function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl ) { + function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) { wfDebug( "Fetching shared description from $renderUrl\n" ); - $res = Http::get( $renderUrl, [], __METHOD__ ); + $res = Http::get( $renderUrl, [], $fname ); if ( !$res ) { $ttl = WANObjectCache::TTL_UNCACHEABLE; }