mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-28 00:20:00 +00:00
Merge "Don't add a link to Special:ReplaceText if the user has no permission"
This commit is contained in:
commit
9b0f7ff6fe
2
README
2
README
|
@ -38,7 +38,7 @@ your MediaWiki 'extensions' directory, then add the following line to your
|
|||
|
||||
wfLoadExtension( 'ReplaceText' );
|
||||
|
||||
In order to perform replacements, you must have the 'replacetext' permssion;
|
||||
In order to perform replacements, you must have the 'replacetext' permission;
|
||||
if you are an administrator on your wiki, the easiest way to do this is to
|
||||
also add the following line:
|
||||
|
||||
|
|
|
@ -89,6 +89,9 @@ class Hooks implements
|
|||
* @param Title $nt Title object of the new article (moved to)
|
||||
*/
|
||||
public function onSpecialMovepageAfterMove( $form, $ot, $nt ) {
|
||||
if ( !$form->getUser()->isAllowed( 'replacetext' ) ) {
|
||||
return;
|
||||
}
|
||||
$out = $form->getOutput();
|
||||
$page = $this->specialPageFactory->getPage( 'ReplaceText' );
|
||||
$pageLink = $form->getLinkRenderer()->makeLink( $page->getPageTitle() );
|
||||
|
|
Loading…
Reference in a new issue