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 "rdbms: make MySQLMasterPos handle inactive GTIDs"
[lhc/web/wiklou.git]
/
includes
/
ProtectionForm.php
diff --git
a/includes/ProtectionForm.php
b/includes/ProtectionForm.php
index
58a04a1
..
53608e8
100644
(file)
--- a/
includes/ProtectionForm.php
+++ b/
includes/ProtectionForm.php
@@
-22,6
+22,7
@@
*
* @file
*/
*
* @file
*/
+use MediaWiki\MediaWikiServices;
/**
* Handles the page protection UI and backend
/**
* Handles the page protection UI and backend
@@
-182,18
+183,10
@@
class ProtectionForm {
throw new ErrorPageError( 'protect-badnamespace-title', 'protect-badnamespace-text' );
}
throw new ErrorPageError( 'protect-badnamespace-title', 'protect-badnamespace-text' );
}
- $out = $this->mContext->getOutput();
- if ( !wfMessage( 'protect-dropdown' )->inContentLanguage()->isDisabled() ) {
- $out->addModules( 'mediawiki.reasonSuggest' );
- $out->addJsConfigVars( [
- 'reasons' => 'protect-dropdown'
- ] );
- }
-
if ( $this->mContext->getRequest()->wasPosted() ) {
if ( $this->save() ) {
$q = $this->mArticle->isRedirect() ? 'redirect=no' : '';
if ( $this->mContext->getRequest()->wasPosted() ) {
if ( $this->save() ) {
$q = $this->mArticle->isRedirect() ? 'redirect=no' : '';
- $
out
->redirect( $this->mTitle->getFullURL( $q ) );
+ $
this->mContext->getOutput()
->redirect( $this->mTitle->getFullURL( $q ) );
}
} else {
$this->show();
}
} else {
$this->show();
@@
-551,9
+544,10
@@
class ProtectionForm {
$out .= Xml::closeElement( 'fieldset' );
if ( $user->isAllowed( 'editinterface' ) ) {
$out .= Xml::closeElement( 'fieldset' );
if ( $user->isAllowed( 'editinterface' ) ) {
- $link = Linker::linkKnown(
+ $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+ $link = $linkRenderer->makeKnownLink(
$context->msg( 'protect-dropdown' )->inContentLanguage()->getTitle(),
$context->msg( 'protect-dropdown' )->inContentLanguage()->getTitle(),
- $context->msg( 'protect-edit-reasonlist' )->
escaped
(),
+ $context->msg( 'protect-edit-reasonlist' )->
text
(),
[],
[ 'action' => 'edit' ]
);
[],
[ 'action' => 'edit' ]
);
@@
-622,7
+616,7
@@
class ProtectionForm {
/**
* Show protection long extracts for this page
*
/**
* Show protection long extracts for this page
*
- * @param OutputPage $out
+ * @param OutputPage
&
$out
* @access private
*/
function showLogExtract( &$out ) {
* @access private
*/
function showLogExtract( &$out ) {