Code Duplication    Length = 11-17 lines in 3 locations

includes/actions/HistoryAction.php 1 location

@@ 142-158 (lines=17) @@
139
		$this->addHelpLink( '//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Page_history', true );
140
141
		// Fail nicely if article doesn't exist.
142
		if ( !$this->page->exists() ) {
143
			$out->addWikiMsg( 'nohistory' );
144
			# show deletion/move log if there is an entry
145
			LogEventsList::showLogExtract(
146
				$out,
147
				[ 'delete', 'move' ],
148
				$this->getTitle(),
149
				'',
150
				[ 'lim' => 10,
151
					'conds' => [ "log_action != 'revision'" ],
152
					'showIfEmpty' => false,
153
					'msgKey' => [ 'moveddeleted-notice' ]
154
				]
155
			);
156
157
			return;
158
		}
159
160
		/**
161
		 * Add date selector to quickly get to a certain time

includes/page/ImagePage.php 1 location

@@ 596-610 (lines=15) @@
593
			}
594
		} else {
595
			# Image does not exist
596
			if ( !$this->getId() ) {
597
				# No article exists either
598
				# Show deletion log to be consistent with normal articles
599
				LogEventsList::showLogExtract(
600
					$out,
601
					[ 'delete', 'move' ],
602
					$this->getTitle()->getPrefixedText(),
603
					'',
604
					[ 'lim' => 10,
605
						'conds' => [ "log_action != 'revision'" ],
606
						'showIfEmpty' => false,
607
						'msgKey' => [ 'moveddeleted-notice' ]
608
					]
609
				);
610
			}
611
612
			if ( $wgEnableUploads && $user->isAllowed( 'upload' ) ) {
613
				// Only show an upload link if the user can upload

includes/EditPage.php 1 location

@@ 2440-2450 (lines=11) @@
2437
			}
2438
		}
2439
		# Give a notice if the user is editing a deleted/moved page...
2440
		if ( !$this->mTitle->exists() ) {
2441
			LogEventsList::showLogExtract( $out, [ 'delete', 'move' ], $this->mTitle,
2442
				'',
2443
				[
2444
					'lim' => 10,
2445
					'conds' => [ "log_action != 'revision'" ],
2446
					'showIfEmpty' => false,
2447
					'msgKey' => [ 'recreate-moveddeleted-warn' ]
2448
				]
2449
			);
2450
		}
2451
	}
2452
2453
	/**