Code Duplication    Length = 5-7 lines in 2 locations

includes/api/ApiQueryBacklinks.php 2 locations

@@ 152-158 (lines=7) @@
149
			}
150
		}
151
152
		if ( $this->params['filterredir'] == 'redirects' ) {
153
			$this->addWhereFld( 'page_is_redirect', 1 );
154
		} elseif ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) {
155
			// bug 22245 - Check for !redirect, as filtering nonredirects, when
156
			// getting what links to them is contradictory
157
			$this->addWhereFld( 'page_is_redirect', 0 );
158
		}
159
160
		$this->addOption( 'LIMIT', $this->params['limit'] + 1 );
161
		$sort = ( $this->params['dir'] == 'descending' ? ' DESC' : '' );
@@ 265-269 (lines=5) @@
262
263
			$this->addWhere( $where );
264
		}
265
		if ( $this->params['filterredir'] == 'redirects' ) {
266
			$this->addWhereFld( 'page_is_redirect', 1 );
267
		} elseif ( $this->params['filterredir'] == 'nonredirects' ) {
268
			$this->addWhereFld( 'page_is_redirect', 0 );
269
		}
270
271
		$this->addOption( 'LIMIT', $this->params['limit'] + 1 );
272
		$orderBy = [];