Go to the documentation of this file.
41 '_OracleDefTS' =>
'USERS',
42 '_OracleTempTS' =>
'TEMP',
43 '_InstallUser' =>
'SYSTEM',
59 if ( $this->
getVar(
'wgDBserver' ) ==
'localhost' ) {
60 $this->parent->setVar(
'wgDBserver',
'' );
65 'config-db-host-oracle',
67 $this->parent->getHelpBox(
'config-db-host-oracle-help' )
71 $this->
getTextBox(
'wgDBprefix',
'config-db-prefix' ) .
72 $this->
getTextBox(
'_OracleDefTS',
'config-oracle-def-ts' ) .
75 'config-oracle-temp-ts',
77 $this->parent->getHelpBox(
'config-db-oracle-help' )
80 $this->parent->getWarningBox(
wfMessage(
'config-db-account-oracle-warn' )->
text() ) .
86 parent::submitInstallUserBox();
87 $this->parent->setVar(
'_InstallDBname', $this->
getVar(
'_InstallUser' ) );
100 $this->parent->setVar(
'wgDBname', $this->
getVar(
'wgDBuser' ) );
104 if ( !strlen( $newValues[
'wgDBserver'] ) ) {
105 $status->fatal(
'config-missing-db-server-oracle' );
106 } elseif ( !self::checkConnectStringFormat( $newValues[
'wgDBserver'] ) ) {
107 $status->fatal(
'config-invalid-db-server-oracle', $newValues[
'wgDBserver'] );
109 if ( !preg_match(
'/^[a-zA-Z0-9_]*$/', $newValues[
'wgDBprefix'] ) ) {
110 $status->fatal(
'config-invalid-schema', $newValues[
'wgDBprefix'] );
112 if ( !$status->isOK() ) {
118 if ( !$status->isOK() ) {
125 if ( !$status->isOK() ) {
126 if ( $this->connError == 28009 ) {
130 if ( !$status->isOK() ) {
134 if ( !$status->isOK() ) {
137 if ( !$this->
getVar(
'_CreateDBAccount' ) ) {
138 $status->fatal(
'config-db-sys-create-oracle' );
147 if ( !$statusIS3->isOK() ) {
155 $conn = $status->value;
158 $version = $conn->getServerVersion();
159 if ( version_compare(
$version, $this->minimumVersion ) < 0 ) {
170 $this->
getVar(
'wgDBserver' ),
171 $this->
getVar(
'_InstallUser' ),
172 $this->
getVar(
'_InstallPassword' ),
173 $this->
getVar(
'_InstallDBname' ),
175 $this->
getVar(
'wgDBprefix' )
177 $status->value =
$db;
179 $this->connError =
$e->db->lastErrno();
180 $status->fatal(
'config-connection-error',
$e->getMessage() );
190 $this->
getVar(
'wgDBserver' ),
191 $this->
getVar(
'_InstallUser' ),
192 $this->
getVar(
'_InstallPassword' ),
193 $this->
getVar(
'_InstallDBname' ),
195 $this->
getVar(
'wgDBprefix' )
197 $status->value =
$db;
199 $this->connError =
$e->db->lastErrno();
200 $status->fatal(
'config-connection-error',
$e->getMessage() );
207 $tempDBname = $this->
getVar(
'wgDBname' );
208 $this->parent->setVar(
'wgDBname', $this->
getVar(
'wgDBuser' ) );
209 $retVal = parent::needsUpgrade();
210 $this->parent->setVar(
'wgDBname', $tempDBname );
216 # Add our user callback to installSteps, right before the tables are created.
219 'callback' =>
array( $this,
'setupUser' )
221 $this->parent->addInstallStep( $callback,
'database' );
233 if ( !$this->
getVar(
'_CreateDBAccount' ) ) {
239 if ( !$status->isOK() ) {
240 if ( $this->connError == 1031 ) {
243 if ( !$status->isOK() ) {
251 $this->db = $status->value;
254 if ( !$this->db->selectDB( $this->getVar(
'wgDBuser' ) ) ) {
256 $error = $this->db->sourceFile(
"$IP/maintenance/oracle/user.sql" );
257 if (
$error !==
true || !$this->db->selectDB( $this->getVar(
'wgDBuser' ) ) ) {
258 $status->fatal(
'config-install-user-failed', $this->
getVar(
'wgDBuser' ),
$error );
260 } elseif ( $this->db->getFlag(
DBO_SYSDBA ) ) {
261 $status->fatal(
'config-db-sys-user-exists-oracle', $this->
getVar(
'wgDBuser' ) );
264 if ( $status->isOK() ) {
270 $this->parent->setVar(
'_InstallUser', $this->
getVar(
'wgDBuser' ) );
271 $this->parent->setVar(
'_InstallPassword', $this->
getVar(
'wgDBpassword' ) );
272 $this->parent->setVar(
'_InstallDBname', $this->
getVar(
'wgDBuser' ) );
286 $this->parent->setVar(
'wgDBname', $this->
getVar(
'wgDBuser' ) );
287 $status = parent::createTables();
290 $this->db->query(
'BEGIN fill_wiki_info; END;' );
297 # These variables
are used by maintenance/oracle/
user.sql
307 foreach ( $varNames
as $name ) {
315 $prefix = $this->
getVar(
'wgDBprefix' );
317 return "# Oracle specific settings
318 \$wgDBprefix = \"{$prefix}\";
339 $isValid = preg_match(
'/^[[:alpha:]][\w\-]*(?:\.[[:alpha:]][\w\-]*){0,2}$/', $connect_string );
340 $isValid |= preg_match(
'/^(?:\/\/)?[\w\-\.]+(?::[\d]+)?(?:\/(?:[\w\-\.]+(?::(pooled|dedicated|shared))?)?(?:\/[\w\-\.]+)?)?$/', $connect_string );
342 return (
bool)$isValid;
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
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.
needsUpgrade()
Determine whether an existing installation of MediaWiki is present in the configured administrative c...
static checkConnectStringFormat( $connect_string)
Function checks the format of Oracle connect string The actual validity of the string is checked by a...
static newGood( $value=null)
Factory function for good results.
getTextBox( $var, $label, $attribs=array(), $helpData="")
Get a labelled text box to configure a local variable.
static closeElement( $element)
Returns "</$element>", except if $wgWellFormedXml is off, in which case it returns the empty string w...
static openElement( $element, $attribs=array())
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
submitInstallUserBox()
Submit a standard install user fieldset.
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
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....
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables 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 "<
setupSchemaVars()
Set appropriate schema variables in the current database connection.
createTables()
Overload: after this action field info table has to be rebuilt.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
getWebUserBox( $noCreateMsg=false)
Get a standard web-user fieldset.
DatabaseBase $db
The database connection.
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 and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same user
Allows to change the fields on the form that will be generated $name
getVar( $var, $default=null)
Get a variable, taking local defaults into account.
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.
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types are
you don t have to do a grep find to see where the $wgReverseTitle variable is used
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
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.
preInstall()
Allow DB installers a chance to make last-minute changes before installation occurs.
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object & $error
static newFatal( $message)
Factory function for fatal errors.