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,
@@ 3383-3392 (lines=10) @@
3380
	 * @param string $patch The name of the patch, like patch-something.sql
3381
	 * @return string Full path to patch file
3382
	 */
3383
	public function patchPath( $patch ) {
3384
		global $IP;
3385
3386
		$dbType = $this->getType();
3387
		if ( file_exists( "$IP/maintenance/$dbType/archives/$patch" ) ) {
3388
			return "$IP/maintenance/$dbType/archives/$patch";
3389
		} else {
3390
			return "$IP/maintenance/archives/$patch";
3391
		}
3392
	}
3393
3394
	public function setSchemaVars( $vars ) {
3395
		$this->mSchemaVars = $vars;