Go to the documentation of this file.
43 '_OracleDefTS' =>
'USERS',
44 '_OracleTempTS' =>
'TEMP',
45 '_InstallUser' =>
'SYSTEM',
61 if ( $this->
getVar(
'wgDBserver' ) ==
'localhost' ) {
62 $this->parent->setVar(
'wgDBserver',
'' );
67 'config-db-host-oracle',
69 $this->parent->getHelpBox(
'config-db-host-oracle-help' )
73 $this->
getTextBox(
'wgDBprefix',
'config-db-prefix' ) .
74 $this->
getTextBox(
'_OracleDefTS',
'config-oracle-def-ts' ) .
77 'config-oracle-temp-ts',
79 $this->parent->getHelpBox(
'config-db-oracle-help' )
82 $this->parent->getWarningBox(
wfMessage(
'config-db-account-oracle-warn' )->
text() ) .
88 parent::submitInstallUserBox();
89 $this->parent->setVar(
'_InstallDBname', $this->
getVar(
'_InstallUser' ) );
102 $this->parent->setVar(
'wgDBname', $this->
getVar(
'wgDBuser' ) );
106 if ( !strlen( $newValues[
'wgDBserver'] ) ) {
107 $status->fatal(
'config-missing-db-server-oracle' );
108 } elseif ( !self::checkConnectStringFormat( $newValues[
'wgDBserver'] ) ) {
109 $status->fatal(
'config-invalid-db-server-oracle', $newValues[
'wgDBserver'] );
111 if ( !preg_match(
'/^[a-zA-Z0-9_]*$/', $newValues[
'wgDBprefix'] ) ) {
112 $status->fatal(
'config-invalid-schema', $newValues[
'wgDBprefix'] );
128 if ( $this->connError == 28009 ) {
139 if ( !$this->
getVar(
'_CreateDBAccount' ) ) {
140 $status->fatal(
'config-db-sys-create-oracle' );
149 if ( !$statusIS3->isOK() ) {
160 $version = $conn->getServerVersion();
161 if ( version_compare( $version, $this->minimumVersion ) < 0 ) {
162 return Status::newFatal(
'config-oracle-old', $this->minimumVersion, $version );
172 $this->
getVar(
'wgDBserver' ),
173 $this->
getVar(
'_InstallUser' ),
174 $this->
getVar(
'_InstallPassword' ),
175 $this->
getVar(
'_InstallDBname' ),
177 $this->
getVar(
'wgDBprefix' )
181 $this->connError =
$e->db->lastErrno();
182 $status->fatal(
'config-connection-error',
$e->getMessage() );
192 $this->
getVar(
'wgDBserver' ),
193 $this->
getVar(
'_InstallUser' ),
194 $this->
getVar(
'_InstallPassword' ),
195 $this->
getVar(
'_InstallDBname' ),
197 $this->
getVar(
'wgDBprefix' )
201 $this->connError =
$e->db->lastErrno();
202 $status->fatal(
'config-connection-error',
$e->getMessage() );
209 $tempDBname = $this->
getVar(
'wgDBname' );
210 $this->parent->setVar(
'wgDBname', $this->
getVar(
'wgDBuser' ) );
211 $retVal = parent::needsUpgrade();
212 $this->parent->setVar(
'wgDBname', $tempDBname );
218 # Add our user callback to installSteps, right before the tables are created.
221 'callback' => [ $this,
'setupUser' ]
223 $this->parent->addInstallStep( $callback,
'database' );
235 if ( !$this->
getVar(
'_CreateDBAccount' ) ) {
242 if ( $this->connError == 1031 ) {
256 if ( !$this->db->selectDB( $this->getVar(
'wgDBuser' ) ) ) {
258 $error = $this->db->sourceFile(
"$IP/maintenance/oracle/user.sql" );
259 if ( $error !==
true || !$this->db->selectDB( $this->getVar(
'wgDBuser' ) ) ) {
260 $status->fatal(
'config-install-user-failed', $this->
getVar(
'wgDBuser' ), $error );
262 } elseif ( $this->db->getFlag(
DBO_SYSDBA ) ) {
263 $status->fatal(
'config-db-sys-user-exists-oracle', $this->
getVar(
'wgDBuser' ) );
272 $this->parent->setVar(
'_InstallUser', $this->
getVar(
'wgDBuser' ) );
273 $this->parent->setVar(
'_InstallPassword', $this->
getVar(
'wgDBpassword' ) );
274 $this->parent->setVar(
'_InstallDBname', $this->
getVar(
'wgDBuser' ) );
288 $this->parent->setVar(
'wgDBname', $this->
getVar(
'wgDBuser' ) );
289 $status = parent::createTables();
292 $this->db->query(
'BEGIN fill_wiki_info; END;' );
299 # These variables are used by maintenance/oracle/user.sql
305 # These are used by tables.sql
309 foreach ( $varNames
as $name ) {
317 $prefix = $this->
getVar(
'wgDBprefix' );
319 return "# Oracle specific settings
320 \$wgDBprefix = \"{$prefix}\";
341 $isValid = preg_match(
'/^[[:alpha:]][\w\-]*(?:\.[[:alpha:]][\w\-]*){0,2}$/', $connect_string );
342 $isValid |= preg_match(
'/^(?:\/\/)?[\w\-\.]+(?::[\d]+)?(?:\/(?:[\w\-\.]+(?::(pooled|dedicated|shared))?)?(?:\/[\w\-\.]+)?)?$/', $connect_string );
344 return (
bool)$isValid;
getConnectForm()
Get HTML for a web form that configures this database.
static checkExtension( $name)
Convenience function.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
getConnection()
Connect to the database using the administrative user/password currently defined in the session.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set $status
needsUpgrade()
Determine whether an existing installation of MediaWiki is present in the configured administrative c...
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
static checkConnectStringFormat( $connect_string)
Function checks the format of Oracle connect string The actual validity of the string is checked by a...
static newFatal( $message)
Factory function for fatal errors.
getTextBox( $var, $label, $attribs=[], $helpData="")
Get a labelled text box to configure a local variable.
Allows to change the fields on the form that will be generated $name
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static closeElement( $element)
Returns "</$element>".
submitInstallUserBox()
Submit a standard install user fieldset.
submitWebUserBox()
Submit the form from getWebUserBox().
getLocalSettings()
Get the DBMS-specific options for LocalSettings.php generation.
getSchemaVars()
Override this to provide DBMS-specific schema variables, to be substituted into tables....
setupSchemaVars()
Set appropriate schema variables in the current database connection.
createTables()
Overload: after this action field info table has to be rebuilt.
when a variable name is used in a it is silently declared as a new masking the global
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
getWebUserBox( $noCreateMsg=false)
Get a standard web-user fieldset.
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException' returning false will NOT prevent logging $e
getVar( $var, $default=null)
Get a variable, taking local defaults into account.
static newGood( $value=null)
Factory function for good results.
setupDatabase()
Create the database and return a Status object indicating success or failure.
Base class for DBMS-specific installation helper classes.
openConnection()
Open a connection to the database using the administrative user/password currently defined in the ses...
submitConnectForm()
Set variables based on the request array, assuming it was submitted via the form returned by getConne...
getName()
Return the internal name, e.g.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static openElement( $element, $attribs=[])
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
getInstallUserBox()
Get a standard install-user fieldset.
setVarsFromRequest( $varNames)
Convenience function to set variables based on form data.
Class for setting up the MediaWiki database using Oracle.
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
Database $db
The database connection.
preInstall()
Allow DB installers a chance to make last-minute changes before installation occurs.
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).