| @@ 238-247 (lines=10) @@ | ||
| 235 | * @param string $filename |
|
| 236 | * @return string |
|
| 237 | */ |
|
| 238 | private function getSqlFilePath( $db, $filename ) { |
|
| 239 | global $IP; |
|
| 240 | ||
| 241 | $dbmsSpecificFilePath = "$IP/maintenance/" . $db->getType() . "/$filename"; |
|
| 242 | if ( file_exists( $dbmsSpecificFilePath ) ) { |
|
| 243 | return $dbmsSpecificFilePath; |
|
| 244 | } else { |
|
| 245 | return "$IP/maintenance/$filename"; |
|
| 246 | } |
|
| 247 | } |
|
| 248 | ||
| 249 | /** |
|
| 250 | * Return a path to the DBMS-specific schema file, |
|
| @@ 706-715 (lines=10) @@ | ||
| 703 | * @param string $patch The name of the patch, like patch-something.sql |
|
| 704 | * @return string Full path to patch file |
|
| 705 | */ |
|
| 706 | public function patchPath( IDatabase $db, $patch ) { |
|
| 707 | global $IP; |
|
| 708 | ||
| 709 | $dbType = $db->getType(); |
|
| 710 | if ( file_exists( "$IP/maintenance/$dbType/archives/$patch" ) ) { |
|
| 711 | return "$IP/maintenance/$dbType/archives/$patch"; |
|
| 712 | } else { |
|
| 713 | return "$IP/maintenance/archives/$patch"; |
|
| 714 | } |
|
| 715 | } |
|
| 716 | ||
| 717 | /** |
|
| 718 | * Add a new table to the database |
|