Code Duplication    Length = 11-15 lines in 2 locations

includes/page/ImagePage.php 1 location

@@ 584-598 (lines=15) @@
581
			}
582
		} else {
583
			# Image does not exist
584
			if ( !$this->getId() ) {
585
				# No article exists either
586
				# Show deletion log to be consistent with normal articles
587
				LogEventsList::showLogExtract(
588
					$out,
589
					[ 'delete', 'move' ],
590
					$this->getTitle()->getPrefixedText(),
591
					'',
592
					[ 'lim' => 10,
593
						'conds' => [ "log_action != 'revision'" ],
594
						'showIfEmpty' => false,
595
						'msgKey' => [ 'moveddeleted-notice' ]
596
					]
597
				);
598
			}
599
600
			if ( $wgEnableUploads && $user->isAllowed( 'upload' ) ) {
601
				// Only show an upload link if the user can upload

includes/EditPage.php 1 location

@@ 2504-2514 (lines=11) @@
2501
			}
2502
		}
2503
		# Give a notice if the user is editing a deleted/moved page...
2504
		if ( !$this->mTitle->exists() ) {
2505
			LogEventsList::showLogExtract( $wgOut, [ 'delete', 'move' ], $this->mTitle,
2506
				'',
2507
				[
2508
					'lim' => 10,
2509
					'conds' => [ "log_action != 'revision'" ],
2510
					'showIfEmpty' => false,
2511
					'msgKey' => [ 'recreate-moveddeleted-warn' ]
2512
				]
2513
			);
2514
		}
2515
	}
2516
2517
	/**