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 "Don't indicate partial blocks on Special:ActiveUsers"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialLockdb.php
diff --git
a/includes/specials/SpecialLockdb.php
b/includes/specials/SpecialLockdb.php
index
2d087ca
..
a2c2530
100644
(file)
--- a/
includes/specials/SpecialLockdb.php
+++ b/
includes/specials/SpecialLockdb.php
@@
-21,6
+21,8
@@
* @ingroup SpecialPage
*/
* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
+
/**
* A form to make the database readonly (eg for maintenance purposes).
*
/**
* A form to make the database readonly (eg for maintenance purposes).
*
@@
-74,15
+76,13
@@
class SpecialLockdb extends FormSpecialPage {
}
public function onSubmit( array $data ) {
}
public function onSubmit( array $data ) {
- global $wgContLang;
-
if ( !$data['Confirm'] ) {
return Status::newFatal( 'locknoconfirm' );
}
if ( !$data['Confirm'] ) {
return Status::newFatal( 'locknoconfirm' );
}
-
MediaWiki
\suppressWarnings();
+
Wikimedia
\suppressWarnings();
$fp = fopen( $this->getConfig()->get( 'ReadOnlyFile' ), 'w' );
$fp = fopen( $this->getConfig()->get( 'ReadOnlyFile' ), 'w' );
-
MediaWiki
\restoreWarnings();
+
Wikimedia
\restoreWarnings();
if ( false === $fp ) {
# This used to show a file not found error, but the likeliest reason for fopen()
if ( false === $fp ) {
# This used to show a file not found error, but the likeliest reason for fopen()
@@
-92,10
+92,11
@@
class SpecialLockdb extends FormSpecialPage {
}
fwrite( $fp, $data['Reason'] );
$timestamp = wfTimestampNow();
}
fwrite( $fp, $data['Reason'] );
$timestamp = wfTimestampNow();
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
fwrite( $fp, "\n<p>" . $this->msg( 'lockedbyandtime',
$this->getUser()->getName(),
fwrite( $fp, "\n<p>" . $this->msg( 'lockedbyandtime',
$this->getUser()->getName(),
- $
wgC
ontLang->date( $timestamp, false, false ),
- $
wgC
ontLang->time( $timestamp, false, false )
+ $
c
ontLang->date( $timestamp, false, false ),
+ $
c
ontLang->time( $timestamp, false, false )
)->inContentLanguage()->text() . "</p>\n" );
fclose( $fp );
)->inContentLanguage()->text() . "</p>\n" );
fclose( $fp );