Code Duplication    Length = 13-18 lines in 2 locations

includes/Title.php 1 location

@@ 370-387 (lines=18) @@
367
	 *
368
	 * @return array
369
	 */
370
	protected static function getSelectFields() {
371
		global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
372
373
		$fields = [
374
			'page_namespace', 'page_title', 'page_id',
375
			'page_len', 'page_is_redirect', 'page_latest',
376
		];
377
378
		if ( $wgContentHandlerUseDB ) {
379
			$fields[] = 'page_content_model';
380
		}
381
382
		if ( $wgPageLanguageUseDB ) {
383
			$fields[] = 'page_lang';
384
		}
385
386
		return $fields;
387
	}
388
389
	/**
390
	 * Create a new Title from an article ID

includes/cache/LinkCache.php 1 location

@@ 210-222 (lines=13) @@
207
	 * @since 1.28
208
	 * @return array
209
	 */
210
	public static function getSelectFields() {
211
		global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
212
213
		$fields = [ 'page_id', 'page_len', 'page_is_redirect', 'page_latest' ];
214
		if ( $wgContentHandlerUseDB ) {
215
			$fields[] = 'page_content_model';
216
		}
217
		if ( $wgPageLanguageUseDB ) {
218
			$fields[] = 'page_lang';
219
		}
220
221
		return $fields;
222
	}
223
224
	/**
225
	 * Add a title to the link cache, return the page_id or zero if non-existent