diff options
author | Aryeh Gregor <ayg@aryeh.name> | 2018-07-29 15:24:54 +0300 |
---|---|---|
committer | Kunal Mehta <legoktm@member.fsf.org> | 2018-08-11 22:44:29 -0600 |
commit | 90d4f56fe46140f9e97e2fa72698f98b57447fe5 (patch) | |
tree | aafd71518a89d31a647ae7d4340f1003bc33d3a0 /includes/specials/SpecialLockdb.php | |
parent | 8f8851325ece1be57c7cd896db7f65b34fee7a88 (diff) | |
download | mediawikicore-90d4f56fe46140f9e97e2fa72698f98b57447fe5.tar.gz mediawikicore-90d4f56fe46140f9e97e2fa72698f98b57447fe5.zip |
Mass conversion of $wgContLang to service
Brought to you by vim macros.
Bug: T200246
Change-Id: I79e919f4553e3bd3eb714073fed7a43051b4fb2a
Diffstat (limited to 'includes/specials/SpecialLockdb.php')
-rw-r--r-- | includes/specials/SpecialLockdb.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index fb04b90baea5..a2c25305cab7 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * A form to make the database readonly (eg for maintenance purposes). * @@ -74,8 +76,6 @@ class SpecialLockdb extends FormSpecialPage { } public function onSubmit( array $data ) { - global $wgContLang; - if ( !$data['Confirm'] ) { return Status::newFatal( 'locknoconfirm' ); } @@ -92,10 +92,11 @@ class SpecialLockdb extends FormSpecialPage { } fwrite( $fp, $data['Reason'] ); $timestamp = wfTimestampNow(); + $contLang = MediaWikiServices::getInstance()->getContentLanguage(); fwrite( $fp, "\n<p>" . $this->msg( 'lockedbyandtime', $this->getUser()->getName(), - $wgContLang->date( $timestamp, false, false ), - $wgContLang->time( $timestamp, false, false ) + $contLang->date( $timestamp, false, false ), + $contLang->time( $timestamp, false, false ) )->inContentLanguage()->text() . "</p>\n" ); fclose( $fp ); |