Merge "ApiQueryRevisions: Fix error message key"
[lhc/web/wiklou.git] / includes / logging / ProtectLogFormatter.php
index 02a6972..ba02457 100644 (file)
@@ -150,9 +150,10 @@ class ProtectLogFormatter extends LogFormatter {
        public function formatParametersForApi() {
                $ret = parent::formatParametersForApi();
                if ( isset( $ret['details'] ) && is_array( $ret['details'] ) ) {
+                       $contLang = MediaWikiServices::getInstance()->getContentLanguage();
                        foreach ( $ret['details'] as &$detail ) {
                                if ( isset( $detail['expiry'] ) ) {
-                                       $detail['expiry'] = MediaWikiServices::getInstance()->getContentLanguage()->
+                                       $detail['expiry'] = $contLang->
                                                formatExpiry( $detail['expiry'], TS_ISO_8601, 'infinite' );
                                }
                        }