Code Duplication    Length = 8-12 lines in 2 locations

includes/page/ImageHistoryPseudoPager.php 2 locations

@@ 152-159 (lines=8) @@
149
					$lastIndex = $this->mHist[1]->getTimestamp();
150
					# Display range
151
					$this->mRange = [ 1, $numRows - 1 ];
152
				} else {
153
					# Index value of item past the index
154
					$this->mPastTheEndIndex = $this->mHist[$numRows - 1]->getTimestamp();
155
					# Index value of bottom item in the list
156
					$lastIndex = $this->mHist[$numRows - 2]->getTimestamp();
157
					# Display range
158
					$this->mRange = [ 0, $numRows - 2 ];
159
				}
160
			} else {
161
				# Setting indexes to an empty string means that they will be
162
				# omitted if they would otherwise appear in URLs. It just so
@@ 160-171 (lines=12) @@
157
					# Display range
158
					$this->mRange = [ 0, $numRows - 2 ];
159
				}
160
			} else {
161
				# Setting indexes to an empty string means that they will be
162
				# omitted if they would otherwise appear in URLs. It just so
163
				# happens that this  is the right thing to do in the standard
164
				# UI, in all the relevant cases.
165
				$this->mPastTheEndIndex = '';
166
				# Index value of bottom item in the list
167
				$lastIndex = $this->mIsBackwards ?
168
					$this->mHist[0]->getTimestamp() : $this->mHist[$numRows - 1]->getTimestamp();
169
				# Display range
170
				$this->mRange = [ 0, $numRows - 1 ];
171
			}
172
		} else {
173
			$firstIndex = '';
174
			$lastIndex = '';