MediaWiki REL1_29
|
Class for setting up the MediaWiki database using Oracle. More...
Public Member Functions | |
createTables () | |
Overload: after this action field info table has to be rebuilt. | |
getConnectForm () | |
Get HTML for a web form that configures this database. | |
getLocalSettings () | |
Get the DBMS-specific options for LocalSettings.php generation. | |
getName () | |
Return the internal name, e.g. | |
getSchemaVars () | |
Override this to provide DBMS-specific schema variables, to be substituted into tables.sql and other schema files. | |
isCompiled () | |
needsUpgrade () | |
Determine whether an existing installation of MediaWiki is present in the configured administrative connection. | |
openConnection () | |
Open a connection to the database using the administrative user/password currently defined in the session, without any caching. | |
openSYSDBAConnection () | |
preInstall () | |
Allow DB installers a chance to make last-minute changes before installation occurs. | |
setupDatabase () | |
Create the database and return a Status object indicating success or failure. | |
setupUser () | |
submitConnectForm () | |
Set variables based on the request array, assuming it was submitted via the form returned by getConnectForm(). | |
submitInstallUserBox () | |
Submit a standard install user fieldset. | |
![]() | |
__construct ( $parent) | |
Construct and initialise parent. | |
checkPrerequisites () | |
Checks for installation prerequisites other than those checked by isCompiled() | |
createExtensionTables () | |
Create the tables for each extension the user enabled. | |
doUpgrade () | |
Perform database upgrades. | |
enableLB () | |
Set up LBFactory so that wfGetDB() etc. | |
getCheckBox ( $var, $label, $attribs=[], $helpData="") | |
Get a labelled checkbox to configure a local boolean variable. | |
getConnection () | |
Connect to the database using the administrative user/password currently defined in the session. | |
getGlobalDefaults () | |
Get a name=>value map of MW configuration globals for the default values. | |
getGlobalNames () | |
Get an array of MW configuration globals that will be configured by this class. | |
getInstallUserBox () | |
Get a standard install-user fieldset. | |
getInternalDefaults () | |
Get a name=>value map of internal variables used during installation. | |
getPasswordBox ( $var, $label, $attribs=[], $helpData="") | |
Get a labelled password box to configure a local variable. | |
getRadioSet ( $params) | |
Get a set of labelled radio buttons. | |
getReadableName () | |
Get the internationalised name for this DBMS. | |
getSchemaPath ( $db) | |
Return a path to the DBMS-specific schema file, otherwise default to tables.sql. | |
getSettingsForm () | |
Get HTML for a web form that retrieves settings used for installation. | |
getTextBox ( $var, $label, $attribs=[], $helpData="") | |
Get a labelled text box to configure a local variable. | |
getUpdateKeysPath ( $db) | |
Return a path to the DBMS-specific update key file, otherwise default to update-keys.sql. | |
getVar ( $var, $default=null) | |
Get a variable, taking local defaults into account. | |
getWebUserBox ( $noCreateMsg=false) | |
Get a standard web-user fieldset. | |
insertUpdateKeys () | |
Insert update keys into table to prevent running unneded updates. | |
outputHandler ( $string) | |
populateInterwikiTable () | |
Common function for databases that don't understand the MySQLish syntax of interwiki.sql. | |
preUpgrade () | |
Allow DB installers a chance to make checks before upgrade. | |
setupSchemaVars () | |
Set appropriate schema variables in the current database connection. | |
setVar ( $name, $value) | |
Convenience alias for $this->parent->setVar() | |
setVarsFromRequest ( $varNames) | |
Convenience function to set variables based on form data. | |
submitSettingsForm () | |
Set variables based on the request array, assuming it was submitted via the form return by getSettingsForm(). | |
submitWebUserBox () | |
Submit the form from getWebUserBox(). | |
Static Public Member Functions | |
static | checkConnectStringFormat ( $connect_string) |
Function checks the format of Oracle connect string The actual validity of the string is checked by attempting to connect. | |
Public Attributes | |
$minimumVersion = '9.0.1' | |
![]() | |
Database | $db = null |
The database connection. | |
WebInstaller | $parent |
The Installer object. | |
Protected Attributes | |
$connError = null | |
$globalNames | |
$internalDefaults | |
![]() | |
array | $globalNames = [] |
Array of MW configuration globals this class uses. | |
array | $internalDefaults = [] |
Internal variables for installation. | |
Private Member Functions | |
doOpenConnection ( $flags=0) | |
Additional Inherited Members | |
![]() | |
static | checkExtension ( $name) |
Convenience function. | |
Class for setting up the MediaWiki database using Oracle.
Definition at line 33 of file OracleInstaller.php.
|
static |
Function checks the format of Oracle connect string The actual validity of the string is checked by attempting to connect.
Regex should be able to validate all connect string formats [//](host|tns_name)[:port][/service_name][:POOLED] http://www.orafaq.com/wiki/EZCONNECT
string | $connect_string |
Definition at line 334 of file OracleInstaller.php.
Referenced by OracleInstallerTest\testCheckConnectStringFormat().
OracleInstaller::createTables | ( | ) |
Overload: after this action field info table has to be rebuilt.
Reimplemented from DatabaseInstaller.
Definition at line 281 of file OracleInstaller.php.
References $status, DBO_DDLMODE, DatabaseInstaller\getVar(), and DatabaseInstaller\setupSchemaVars().
|
private |
int | $flags |
Definition at line 181 of file OracleInstaller.php.
References DatabaseInstaller\$db, $e, $flags, $status, DatabaseInstaller\getVar(), and Wikimedia\Rdbms\IDatabase\lastErrno().
Referenced by openConnection(), and openSYSDBAConnection().
OracleInstaller::getConnectForm | ( | ) |
Get HTML for a web form that configures this database.
Configuration at this time should be the minimum needed to connect and test whether install or upgrade is required.
If this is called, $this->parent can be assumed to be a WebInstaller.
Reimplemented from DatabaseInstaller.
Definition at line 61 of file OracleInstaller.php.
References DatabaseInstaller\getInstallUserBox(), DatabaseInstaller\getTextBox(), DatabaseInstaller\getVar(), DatabaseInstaller\getWebUserBox(), text, and wfMessage().
OracleInstaller::getLocalSettings | ( | ) |
Get the DBMS-specific options for LocalSettings.php generation.
Reimplemented from DatabaseInstaller.
Definition at line 312 of file OracleInstaller.php.
References DatabaseInstaller\getVar().
OracleInstaller::getName | ( | ) |
Return the internal name, e.g.
'mysql', or 'sqlite'.
Reimplemented from DatabaseInstaller.
Definition at line 53 of file OracleInstaller.php.
OracleInstaller::getSchemaVars | ( | ) |
Override this to provide DBMS-specific schema variables, to be substituted into tables.sql and other schema files.
Reimplemented from DatabaseInstaller.
Definition at line 293 of file OracleInstaller.php.
References $name, $vars, as, and DatabaseInstaller\getVar().
OracleInstaller::isCompiled | ( | ) |
Reimplemented from DatabaseInstaller.
Definition at line 57 of file OracleInstaller.php.
References DatabaseInstaller\checkExtension().
OracleInstaller::needsUpgrade | ( | ) |
Determine whether an existing installation of MediaWiki is present in the configured administrative connection.
Returns true if there is such a wiki, false if the database doesn't exist.
Traditionally, this is done by testing for the existence of either the revision table or the cur table.
Reimplemented from DatabaseInstaller.
Definition at line 204 of file OracleInstaller.php.
References DatabaseInstaller\getVar().
OracleInstaller::openConnection | ( | ) |
Open a connection to the database using the administrative user/password currently defined in the session, without any caching.
Returns a status object. On success, the status object will contain a Database object in its value member.
Reimplemented from DatabaseInstaller.
Definition at line 169 of file OracleInstaller.php.
References doOpenConnection().
Referenced by setupUser().
OracleInstaller::openSYSDBAConnection | ( | ) |
Definition at line 173 of file OracleInstaller.php.
References doOpenConnection().
Referenced by setupUser(), and submitConnectForm().
OracleInstaller::preInstall | ( | ) |
Allow DB installers a chance to make last-minute changes before installation occurs.
This happens before setupDatabase() or createTables() is called, but long after the constructor. Helpful for things like modifying setup steps :)
Reimplemented from DatabaseInstaller.
Definition at line 213 of file OracleInstaller.php.
OracleInstaller::setupDatabase | ( | ) |
Create the database and return a Status object indicating success or failure.
Reimplemented from DatabaseInstaller.
Definition at line 222 of file OracleInstaller.php.
References $status.
OracleInstaller::setupUser | ( | ) |
Definition at line 228 of file OracleInstaller.php.
References $IP, $status, DBO_DDLMODE, DBO_SYSDBA, DatabaseInstaller\getConnection(), DatabaseInstaller\getVar(), global, openConnection(), openSYSDBAConnection(), and DatabaseInstaller\setupSchemaVars().
OracleInstaller::submitConnectForm | ( | ) |
Set variables based on the request array, assuming it was submitted via the form returned by getConnectForm().
Validate the connection settings by attempting to connect with them.
If this is called, $this->parent can be assumed to be a WebInstaller.
Reimplemented from DatabaseInstaller.
Definition at line 95 of file OracleInstaller.php.
References $status, DatabaseInstaller\getConnection(), DatabaseInstaller\getVar(), openSYSDBAConnection(), DatabaseInstaller\setVarsFromRequest(), submitInstallUserBox(), and DatabaseInstaller\submitWebUserBox().
OracleInstaller::submitInstallUserBox | ( | ) |
Submit a standard install user fieldset.
Reimplemented from DatabaseInstaller.
Definition at line 88 of file OracleInstaller.php.
References DatabaseInstaller\getVar().
Referenced by submitConnectForm().
|
protected |
Definition at line 51 of file OracleInstaller.php.
|
protected |
Definition at line 35 of file OracleInstaller.php.
|
protected |
Definition at line 43 of file OracleInstaller.php.
OracleInstaller::$minimumVersion = '9.0.1' |
Definition at line 49 of file OracleInstaller.php.