dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Disable expensive {{REVISIONID}} magic word in miser mode"
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
file
/
ForeignDBFile.php
diff --git
a/includes/filerepo/file/ForeignDBFile.php
b/includes/filerepo/file/ForeignDBFile.php
index
05df45b
..
1869967
100644
(file)
--- a/
includes/filerepo/file/ForeignDBFile.php
+++ b/
includes/filerepo/file/ForeignDBFile.php
@@
-126,14
+126,14
@@
class ForeignDBFile extends LocalFile {
* @param Language|null $lang Optional language to fetch description in.
* @return string|false
*/
* @param Language|null $lang Optional language to fetch description in.
* @return string|false
*/
- function getDescriptionText( $lang = null ) {
+ function getDescriptionText(
Language
$lang = null ) {
global $wgLang;
if ( !$this->repo->fetchDescription ) {
return false;
}
global $wgLang;
if ( !$this->repo->fetchDescription ) {
return false;
}
- $lang = $lang ?
:
$wgLang;
+ $lang = $lang ?
?
$wgLang;
$renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $lang->getCode() );
if ( !$renderUrl ) {
return false;
$renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $lang->getCode() );
if ( !$renderUrl ) {
return false;
@@
-152,19
+152,19
@@
class ForeignDBFile extends LocalFile {
}
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
}
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $fname = __METHOD__;
return $cache->getWithSetCallback(
$this->repo->getLocalCacheKey(
return $cache->getWithSetCallback(
$this->repo->getLocalCacheKey(
- 'RemoteFileDescription',
- 'url',
+ 'ForeignFileDescription',
$lang->getCode(),
$lang->getCode(),
-
$this->getName(
),
+
md5( $this->getName()
),
$touched
),
$this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
$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" );
wfDebug( "Fetching shared description from $renderUrl\n" );
- $res = Http::get( $renderUrl, [],
__METHOD__
);
+ $res = Http::get( $renderUrl, [],
$fname
);
if ( !$res ) {
$ttl = WANObjectCache::TTL_UNCACHEABLE;
}
if ( !$res ) {
$ttl = WANObjectCache::TTL_UNCACHEABLE;
}