Code Duplication    Length = 17-18 lines in 3 locations

includes/revisiondelete/RevDelArchiveItem.php 1 location

@@ 70-87 (lines=18) @@
67
		return (bool)$dbw->affectedRows();
68
	}
69
70
	protected function getRevisionLink() {
71
		$date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
72
			$this->revision->getTimestamp(), $this->list->getUser() ) );
73
74
		if ( $this->isDeleted() && !$this->canViewContent() ) {
75
			return $date;
76
		}
77
78
		return Linker::link(
79
			SpecialPage::getTitleFor( 'Undelete' ),
80
			$date,
81
			[],
82
			[
83
				'target' => $this->list->title->getPrefixedText(),
84
				'timestamp' => $this->revision->getTimestamp()
85
			]
86
		);
87
	}
88
89
	protected function getDiffLink() {
90
		if ( $this->isDeleted() && !$this->canViewContent() ) {

includes/revisiondelete/RevDelRevisionItem.php 1 location

@@ 109-126 (lines=18) @@
106
	 * Overridden by RevDelArchiveItem.
107
	 * @return string
108
	 */
109
	protected function getRevisionLink() {
110
		$date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
111
			$this->revision->getTimestamp(), $this->list->getUser() ) );
112
113
		if ( $this->isDeleted() && !$this->canViewContent() ) {
114
			return $date;
115
		}
116
117
		return Linker::linkKnown(
118
			$this->list->title,
119
			$date,
120
			[],
121
			[
122
				'oldid' => $this->revision->getId(),
123
				'unhide' => 1
124
			]
125
		);
126
	}
127
128
	/**
129
	 * Get the HTML link to the diff.

includes/RevisionList.php 1 location

@@ 355-371 (lines=17) @@
352
	 * of extending RevDelItem
353
	 * @return string
354
	 */
355
	protected function getRevisionLink() {
356
		$date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
357
			$this->revision->getTimestamp(), $this->list->getUser() ) );
358
359
		if ( $this->isDeleted() && !$this->canViewContent() ) {
360
			return $date;
361
		}
362
		return Linker::linkKnown(
363
			$this->list->title,
364
			$date,
365
			[],
366
			[
367
				'oldid' => $this->revision->getId(),
368
				'unhide' => 1
369
			]
370
		);
371
	}
372
373
	/**
374
	 * Get the HTML link to the diff.