From: Tim Starling Date: Mon, 20 Jun 2011 07:16:09 +0000 (+0000) Subject: Fix for r72150: rename getSchema() to getSchemaPath(). This terminology creates an... X-Git-Tag: 1.31.0-rc.0~29406 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=88e8af820c1f65dda4b2013b33a6eec09e6f3c0f;p=lhc%2Fweb%2Fwiklou.git Fix for r72150: rename getSchema() to getSchemaPath(). This terminology creates an unfortunate and potentially confusing conflict with the PostgreSQL usage of the term. At some point in the future I'd like to have a getSchema() that gives you the PostgreSQL schema name ($wgDBmwschema). Strictly speaking, tables.sql is not a schema, it's an SQL file that creates a schema. --- diff --git a/includes/db/Database.php b/includes/db/Database.php index c925b76aa5..c1b3246edb 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -531,11 +531,11 @@ abstract class DatabaseBase implements DatabaseType { } /** - * Return a path to the DBMS-specific schema, otherwise default to tables.sql + * Return a path to the DBMS-specific schema file, otherwise default to tables.sql * * @return string */ - public function getSchema() { + public function getSchemaPath() { global $IP; if ( file_exists( "$IP/maintenance/" . $this->getType() . "/tables.sql" ) ) { return "$IP/maintenance/" . $this->getType() . "/tables.sql"; diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index a6778c35bf..aadd6b49e7 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -157,7 +157,7 @@ abstract class DatabaseInstaller { $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files $this->db->begin( __METHOD__ ); - $error = $this->db->sourceFile( $this->db->getSchema() ); + $error = $this->db->sourceFile( $this->db->getSchemaPath() ); if( $error !== true ) { $this->db->reportQueryError( $error, 0, '', __METHOD__ ); $this->db->rollback( __METHOD__ ); diff --git a/includes/installer/Ibm_db2Installer.php b/includes/installer/Ibm_db2Installer.php index 246d590b31..78e607fb1e 100644 --- a/includes/installer/Ibm_db2Installer.php +++ b/includes/installer/Ibm_db2Installer.php @@ -185,7 +185,7 @@ class Ibm_db2Installer extends DatabaseInstaller { $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files $this->db->begin( __METHOD__ ); - $error = $this->db->sourceFile( $this->db->getSchema() ); + $error = $this->db->sourceFile( $this->db->getSchemaPath() ); if( $error !== true ) { $this->db->reportQueryError( $error, 0, '', __METHOD__ ); $this->db->rollback( __METHOD__ ); diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index fec928efdd..ea0e8d98d1 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -543,7 +543,7 @@ class PostgresInstaller extends DatabaseInstaller { $status->fatal( 'config-install-pg-schema-not-exist' ); return $status; } - $error = $conn->sourceFile( $conn->getSchema() ); + $error = $conn->sourceFile( $conn->getSchemaPath() ); if( $error !== true ) { $conn->reportQueryError( $error, 0, '', __METHOD__ ); $conn->rollback( __METHOD__ );