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 "maintenance: Sanity check that --replicadb isn't using the master in sql.php"
[lhc/web/wiklou.git]
/
includes
/
logging
/
ProtectLogFormatter.php
diff --git
a/includes/logging/ProtectLogFormatter.php
b/includes/logging/ProtectLogFormatter.php
index
931829a
..
ba02457
100644
(file)
--- a/
includes/logging/ProtectLogFormatter.php
+++ b/
includes/logging/ProtectLogFormatter.php
@@
-22,6
+22,8
@@
* @since 1.26
*/
* @since 1.26
*/
+use MediaWiki\MediaWikiServices;
+
/**
* This class formats protect log entries.
*
/**
* This class formats protect log entries.
*
@@
-146,13
+148,13
@@
class ProtectLogFormatter extends LogFormatter {
}
public function formatParametersForApi() {
}
public function formatParametersForApi() {
- global $wgContLang;
-
$ret = parent::formatParametersForApi();
if ( isset( $ret['details'] ) && is_array( $ret['details'] ) ) {
$ret = parent::formatParametersForApi();
if ( isset( $ret['details'] ) && is_array( $ret['details'] ) ) {
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
foreach ( $ret['details'] as &$detail ) {
if ( isset( $detail['expiry'] ) ) {
foreach ( $ret['details'] as &$detail ) {
if ( isset( $detail['expiry'] ) ) {
- $detail['expiry'] = $wgContLang->formatExpiry( $detail['expiry'], TS_ISO_8601, 'infinite' );
+ $detail['expiry'] = $contLang->
+ formatExpiry( $detail['expiry'], TS_ISO_8601, 'infinite' );
}
}
}
}
}
}