[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/installer/ -> DatabaseInstaller.php (summary)

DBMS-specific installation helper. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 674 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 34 functions

  checkPrerequisites()
  getSettingsForm()
  submitSettingsForm()
  getConnection()
  stepApplySourceFile()
  createTables()
  insertUpdateKeys()
  createExtensionTables()
  getSchemaVars()
  setupSchemaVars()
  enableLB()
  doUpgrade()
  preInstall()
  preUpgrade()
  getGlobalNames()
  __construct()
  checkExtension()
  getReadableName()
  getGlobalDefaults()
  getInternalDefaults()
  getVar()
  setVar()
  getTextBox()
  getPasswordBox()
  getCheckBox()
  getRadioSet()
  setVarsFromRequest()
  needsUpgrade()
  getInstallUserBox()
  submitInstallUserBox()
  getWebUserBox()
  submitWebUserBox()
  populateInterwikiTable()
  outputHandler()

Functions
Functions that are not part of a class:

checkPrerequisites()   X-Ref
Checks for installation prerequisites other than those checked by isCompiled()

return: Status

getSettingsForm()   X-Ref
Get HTML for a web form that retrieves settings used for installation.
$this->parent can be assumed to be a WebInstaller.
If the DB type has no settings beyond those already configured with
getConnectForm(), this should return false.

return: bool

submitSettingsForm()   X-Ref
Set variables based on the request array, assuming it was submitted via
the form return by getSettingsForm().

return: Status

getConnection()   X-Ref
Connect to the database using the administrative user/password currently
defined in the session. Returns a status object. On success, the status
object will contain a Database object in its value member.

This will return a cached connection if one is available.

return: Status

stepApplySourceFile($sourceFileMethod,$stepName,$archiveTableMustNotExist = false)   X-Ref
Apply a SQL source file to the database as part of running an installation step.

param: string $sourceFileMethod
param: string $stepName
param: string $archiveTableMustNotExist
return: Status

createTables()   X-Ref
Create database tables from scratch.

return: Status

insertUpdateKeys()   X-Ref
Insert update keys into table to prevent running unneded updates.

return: Status

createExtensionTables()   X-Ref
Create the tables for each extension the user enabled

return: Status

getSchemaVars()   X-Ref
Override this to provide DBMS-specific schema variables, to be
substituted into tables.sql and other schema files.

return: array

setupSchemaVars()   X-Ref
Set appropriate schema variables in the current database connection.

This should be called after any request data has been imported, but before
any write operations to the database.

enableLB()   X-Ref
Set up LBFactory so that wfGetDB() etc. works.
We set up a special LBFactory instance which returns the current
installer connection.


doUpgrade()   X-Ref
Perform database upgrades

return: bool

preInstall()   X-Ref
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 :)


preUpgrade()   X-Ref
Allow DB installers a chance to make checks before upgrade.


getGlobalNames()   X-Ref
Get an array of MW configuration globals that will be configured by this class.

return: array

__construct( $parent )   X-Ref
Construct and initialise parent.
This is typically only called from Installer::getDBInstaller()

param: WebInstaller $parent

checkExtension( $name )   X-Ref
Convenience function.
Check if a named extension is present.

param: string $name
return: bool

getReadableName()   X-Ref
Get the internationalised name for this DBMS.

return: string

getGlobalDefaults()   X-Ref
Get a name=>value map of MW configuration globals that overrides.
DefaultSettings.php

return: array

getInternalDefaults()   X-Ref
Get a name=>value map of internal variables used during installation.

return: array

getVar( $var, $default = null )   X-Ref
Get a variable, taking local defaults into account.

param: string $var
param: mixed|null $default
return: mixed

setVar( $name, $value )   X-Ref
Convenience alias for $this->parent->setVar()

param: string $name
param: mixed $value

getTextBox( $var, $label, $attribs = array()   X-Ref
Get a labelled text box to configure a local variable.

param: string $var
param: string $label
param: array $attribs
param: string $helpData
return: string

getPasswordBox( $var, $label, $attribs = array()   X-Ref
Get a labelled password box to configure a local variable.
Implements password hiding.

param: string $var
param: string $label
param: array $attribs
param: string $helpData
return: string

getCheckBox( $var, $label, $attribs = array()   X-Ref
Get a labelled checkbox to configure a local boolean variable.

param: string $var
param: string $label
param: array $attribs Optional.
param: string $helpData Optional.
return: string

getRadioSet( $params )   X-Ref
Get a set of labelled radio buttons.

param: array $params Parameters are:
return: string

setVarsFromRequest( $varNames )   X-Ref
Convenience function to set variables based on form data.
Assumes that variables containing "password" in the name are (potentially
fake) passwords.

param: array $varNames
return: array

needsUpgrade()   X-Ref
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.

return: bool

getInstallUserBox()   X-Ref
Get a standard install-user fieldset.

return: string

submitInstallUserBox()   X-Ref
Submit a standard install user fieldset.

return: Status

getWebUserBox( $noCreateMsg = false )   X-Ref
Get a standard web-user fieldset

param: string|bool $noCreateMsg Message to display instead of the creation checkbox.
return: string

submitWebUserBox()   X-Ref
Submit the form from getWebUserBox().

return: Status

populateInterwikiTable()   X-Ref
Common function for databases that don't understand the MySQLish syntax of interwiki.sql.

return: Status

outputHandler( $string )   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1