Code Duplication    Length = 6-6 lines in 2 locations

includes/specials/SpecialContributions.php 1 location

@@ 380-385 (lines=6) @@
377
		# Add a link to change user rights for privileged users
378
		$userrightsPage = new UserrightsPage();
379
		$userrightsPage->setContext( $this->getContext() );
380
		if ( $userrightsPage->userCanChangeRights( $target ) ) {
381
			$tools[] = Linker::linkKnown(
382
				SpecialPage::getTitleFor( 'Userrights', $username ),
383
				$this->msg( 'sp-contributions-userrights' )->escaped()
384
			);
385
		}
386
387
		Hooks::run( 'ContributionsToolLinks', [ $id, $userpage, &$tools ] );
388

includes/specials/SpecialDeletedContributions.php 1 location

@@ 215-220 (lines=6) @@
212
			# Add a link to change user rights for privileged users
213
			$userrightsPage = new UserrightsPage();
214
			$userrightsPage->setContext( $this->getContext() );
215
			if ( $userrightsPage->userCanChangeRights( $userObj ) ) {
216
				$tools[] = Linker::linkKnown(
217
					SpecialPage::getTitleFor( 'Userrights', $nt->getDBkey() ),
218
					$this->msg( 'sp-contributions-userrights' )->escaped()
219
				);
220
			}
221
222
			Hooks::run( 'ContributionsToolLinks', [ $id, $nt, &$tools ] );
223