Code Duplication    Length = 3-3 lines in 2 locations

includes/api/ApiQueryBacklinks.php 2 locations

@@ 163-165 (lines=3) @@
160
		$this->addOption( 'LIMIT', $this->params['limit'] + 1 );
161
		$sort = ( $this->params['dir'] == 'descending' ? ' DESC' : '' );
162
		$orderBy = [];
163
		if ( count( $this->params['namespace'] ) > 1 ) {
164
			$orderBy[] = $this->bl_from_ns . $sort;
165
		}
166
		$orderBy[] = $this->bl_from . $sort;
167
		$this->addOption( 'ORDER BY', $orderBy );
168
		$this->addOption( 'STRAIGHT_JOIN' );
@@ 281-283 (lines=3) @@
278
		if ( count( $allRedirDBkey ) > 1 ) {
279
			$orderBy[] = $this->bl_title . $sort;
280
		}
281
		if ( count( $this->params['namespace'] ) > 1 ) {
282
			$orderBy[] = $this->bl_from_ns . $sort;
283
		}
284
		$orderBy[] = $this->bl_from . $sort;
285
		$this->addOption( 'ORDER BY', $orderBy );
286
		$this->addOption( 'USE INDEX', [ 'page' => 'PRIMARY' ] );