Code Duplication    Length = 9-10 lines in 2 locations

includes/db/Database.php 2 locations

@@ 515-523 (lines=9) @@
512
	 * @param string $filename
513
	 * @return string
514
	 */
515
	private function getSqlFilePath( $filename ) {
516
		global $IP;
517
		$dbmsSpecificFilePath = "$IP/maintenance/" . $this->getType() . "/$filename";
518
		if ( file_exists( $dbmsSpecificFilePath ) ) {
519
			return $dbmsSpecificFilePath;
520
		} else {
521
			return "$IP/maintenance/$filename";
522
		}
523
	}
524
525
	/**
526
	 * Return a path to the DBMS-specific schema file,
@@ 3344-3353 (lines=10) @@
3341
	 * @param string $patch The name of the patch, like patch-something.sql
3342
	 * @return string Full path to patch file
3343
	 */
3344
	public function patchPath( $patch ) {
3345
		global $IP;
3346
3347
		$dbType = $this->getType();
3348
		if ( file_exists( "$IP/maintenance/$dbType/archives/$patch" ) ) {
3349
			return "$IP/maintenance/$dbType/archives/$patch";
3350
		} else {
3351
			return "$IP/maintenance/archives/$patch";
3352
		}
3353
	}
3354
3355
	public function setSchemaVars( $vars ) {
3356
		$this->mSchemaVars = $vars;