Code Duplication    Length = 6-10 lines in 4 locations

includes/specials/SpecialBrokenRedirects.php 1 location

@@ 149-156 (lines=8) @@
146
147
		$out = $from . $this->msg( 'word-separator' )->escaped();
148
149
		if ( $this->getUser()->isAllowed( 'delete' ) ) {
150
			$links[] = Linker::linkKnown(
151
				$fromObj,
152
				$this->msg( 'brokenredirects-delete' )->escaped(),
153
				[],
154
				[ 'action' => 'delete' ]
155
			);
156
		}
157
158
		if ( $links ) {
159
			$out .= $this->msg( 'parentheses' )->rawParams( $this->getLanguage()

includes/specials/SpecialContributions.php 2 locations

@@ 348-355 (lines=8) @@
345
			);
346
347
			# Suppression log link (bug 59120)
348
			if ( $this->getUser()->isAllowed( 'suppressionlog' ) ) {
349
				$tools[] = Linker::linkKnown(
350
					SpecialPage::getTitleFor( 'Log', 'suppress' ),
351
					$this->msg( 'sp-contributions-suppresslog' )->escaped(),
352
					[],
353
					[ 'offender' => $username ]
354
				);
355
			}
356
		}
357
		# Uploads
358
		$tools[] = Linker::linkKnown(
@@ 370-375 (lines=6) @@
367
		);
368
369
		# Add link to deleted user contributions for priviledged users
370
		if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
371
			$tools[] = Linker::linkKnown(
372
				SpecialPage::getTitleFor( 'DeletedContributions', $username ),
373
				$this->msg( 'sp-contributions-deleted' )->escaped()
374
			);
375
		}
376
377
		# Add a link to change user rights for privileged users
378
		$userrightsPage = new UserrightsPage();

includes/specialpage/LoginSignupSpecialPage.php 1 location

@@ 659-668 (lines=10) @@
656
657
		if ( !$this->isSignup() && $this->showExtraInformation() ) {
658
			$passwordReset = new PasswordReset( $this->getConfig(), AuthManager::singleton() );
659
			if ( $passwordReset->isAllowed( $this->getUser() ) ) {
660
				$form->addFooterText( Html::rawElement(
661
					'div',
662
					[ 'class' => 'mw-ui-vform-field mw-form-related-link-container' ],
663
					Linker::link(
664
						SpecialPage::getTitleFor( 'PasswordReset' ),
665
						$this->msg( 'userlogin-resetpassword-link' )->escaped()
666
					)
667
				) );
668
			}
669
670
			// Don't show a "create account" link if the user can't.
671
			if ( $this->showCreateAccountLink() ) {