Code Duplication    Length = 11-17 lines in 3 locations

includes/actions/HistoryAction.php 1 location

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

includes/page/ImagePage.php 1 location

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

includes/EditPage.php 1 location

@@ 2378-2388 (lines=11) @@
2375
			}
2376
		}
2377
		# Give a notice if the user is editing a deleted/moved page...
2378
		if ( !$this->mTitle->exists() ) {
2379
			LogEventsList::showLogExtract( $wgOut, [ 'delete', 'move' ], $this->mTitle,
2380
				'',
2381
				[
2382
					'lim' => 10,
2383
					'conds' => [ "log_action != 'revision'" ],
2384
					'showIfEmpty' => false,
2385
					'msgKey' => [ 'recreate-moveddeleted-warn' ]
2386
				]
2387
			);
2388
		}
2389
	}
2390
2391
	/**