Code Duplication    Length = 11-17 lines in 3 locations

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/actions/HistoryAction.php 1 location

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

includes/EditPage.php 1 location

@@ 2398-2408 (lines=11) @@
2395
			}
2396
		}
2397
		# Give a notice if the user is editing a deleted/moved page...
2398
		if ( !$this->mTitle->exists() ) {
2399
			LogEventsList::showLogExtract( $wgOut, [ 'delete', 'move' ], $this->mTitle,
2400
				'',
2401
				[
2402
					'lim' => 10,
2403
					'conds' => [ "log_action != 'revision'" ],
2404
					'showIfEmpty' => false,
2405
					'msgKey' => [ 'recreate-moveddeleted-warn' ]
2406
				]
2407
			);
2408
		}
2409
	}
2410
2411
	/**