jenkins-bot has submitted this change and it was merged.
Change subject: Remove (edit) from Special:Tags for non-editinterface users
......................................................................
Remove (edit) from Special:Tags for non-editinterface users
bug: 46180
Change-Id: I5106428b78ebdeeda4afe6fd07fba4e1e264dd18
---
M includes/specials/SpecialTags.php
1 file changed, 11 insertions(+), 6 deletions(-)
Approvals:
Alex Monk: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialTags.php
b/includes/specials/SpecialTags.php
index 6d16103..026b936 100644
--- a/includes/specials/SpecialTags.php
+++ b/includes/specials/SpecialTags.php
@@ -68,20 +68,25 @@
return '';
}
+ $user = $this->getUser();
$newRow = '';
$newRow .= Xml::tags( 'td', null, Xml::element( 'code', null,
$tag ) );
$disp = ChangeTags::tagDescription( $tag );
- $disp .= ' ';
- $editLink = Linker::link( Title::makeTitle( NS_MEDIAWIKI,
"Tag-$tag" ), $this->msg( 'tags-edit' )->escaped() );
- $disp .= $this->msg( 'parentheses' )->rawParams( $editLink
)->escaped();
+ if ( $user->isAllowed( 'editinterface' ) ) {
+ $disp .= ' ';
+ $editLink = Linker::link( Title::makeTitle(
NS_MEDIAWIKI, "Tag-$tag" ), $this->msg( 'tags-edit' )->escaped() );
+ $disp .= $this->msg( 'parentheses' )->rawParams(
$editLink )->escaped();
+ }
$newRow .= Xml::tags( 'td', null, $disp );
$msg = $this->msg( "tag-$tag-description" );
$desc = !$msg->exists() ? '' : $msg->parse();
- $desc .= ' ';
- $editDescLink = Linker::link( Title::makeTitle( NS_MEDIAWIKI,
"Tag-$tag-description" ), $this->msg( 'tags-edit' )->escaped() );
- $desc .= $this->msg( 'parentheses' )->rawParams( $editDescLink
)->escaped();
+ if ( $user->isAllowed( 'editinterface' ) ) {
+ $desc .= ' ';
+ $editDescLink = Linker::link( Title::makeTitle(
NS_MEDIAWIKI, "Tag-$tag-description" ), $this->msg( 'tags-edit' )->escaped() );
+ $desc .= $this->msg( 'parentheses' )->rawParams(
$editDescLink )->escaped();
+ }
$newRow .= Xml::tags( 'td', null, $desc );
$hitcount = $this->msg( 'tags-hitcount' )->numParams( $hitcount
)->escaped();
--
To view, visit https://gerrit.wikimedia.org/r/54715
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5106428b78ebdeeda4afe6fd07fba4e1e264dd18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits