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

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

includes/EditPage.php 1 location

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