Go to the documentation of this file.
43 'wgDBWindowsAuthentication',
47 '_InstallUser' =>
'sa',
48 '_InstallWindowsAuthentication' =>
'sqlauth',
49 '_WebWindowsAuthentication' =>
'sqlauth',
86 if ( $this->
getVar(
'_InstallWindowsAuthentication' ) ==
'windowsauth' ) {
87 $displayStyle =
'display: none;';
89 $displayStyle =
'display: block;';
96 $this->parent->getHelpBox(
'config-db-host-help' )
100 $this->
getTextBox(
'wgDBname',
'config-db-name', [
'dir' =>
'ltr' ],
101 $this->parent->getHelpBox(
'config-db-name-help' ) ) .
102 $this->
getTextBox(
'wgDBmwschema',
'config-db-schema', [
'dir' =>
'ltr' ],
103 $this->parent->getHelpBox(
'config-db-schema-help' ) ) .
104 $this->
getTextBox(
'wgDBprefix',
'config-db-prefix', [
'dir' =>
'ltr' ],
105 $this->parent->getHelpBox(
'config-db-prefix-help' ) ) .
110 'var' =>
'_InstallWindowsAuthentication',
111 'label' =>
'config-mssql-auth',
112 'itemLabelPrefix' =>
'config-mssql-',
113 'values' => [
'sqlauth',
'windowsauth' ],
116 'class' =>
'showHideRadio',
117 'rel' =>
'dbCredentialBox',
120 'class' =>
'hideShowRadio',
121 'rel' =>
'dbCredentialBox',
124 'help' => $this->parent->getHelpBox(
'config-mssql-install-auth' )
126 Html::openElement(
'div', [
'id' =>
'dbCredentialBox',
'style' => $displayStyle ] ) .
129 'config-db-username',
131 $this->parent->getHelpBox(
'config-db-install-username' )
135 'config-db-password',
137 $this->parent->getHelpBox(
'config-db-install-password' )
154 if ( !strlen( $newValues[
'wgDBserver'] ) ) {
155 $status->fatal(
'config-missing-db-host' );
157 if ( !strlen( $newValues[
'wgDBname'] ) ) {
158 $status->fatal(
'config-missing-db-name' );
159 } elseif ( !preg_match(
'/^[a-z0-9_]+$/i', $newValues[
'wgDBname'] ) ) {
160 $status->fatal(
'config-invalid-db-name', $newValues[
'wgDBname'] );
162 if ( !preg_match(
'/^[a-z0-9_]*$/i', $newValues[
'wgDBmwschema'] ) ) {
163 $status->fatal(
'config-invalid-schema', $newValues[
'wgDBmwschema'] );
165 if ( !preg_match(
'/^[a-z0-9_]*$/i', $newValues[
'wgDBprefix'] ) ) {
166 $status->fatal(
'config-invalid-db-prefix', $newValues[
'wgDBprefix'] );
173 if ( $newValues[
'wgDBmwschema'] ===
'' ) {
174 $this->
setVar(
'wgDBmwschema',
'dbo' );
181 '_InstallWindowsAuthentication'
195 return static::meetsMinimumRequirement( $conn->getServerVersion() );
205 $password = $this->
getVar(
'_InstallPassword' );
207 if ( $this->
getVar(
'_InstallWindowsAuthentication' ) ==
'windowsauth' ) {
209 $wgDBWindowsAuthentication =
true;
215 $db = Database::factory(
'mssql', [
216 'host' => $this->
getVar(
'wgDBserver' ),
217 'port' => $this->
getVar(
'wgDBport' ),
219 'password' => $password,
222 'schema' => $this->
getVar(
'wgDBmwschema' ),
223 'tablePrefix' => $this->
getVar(
'wgDBprefix' ) ] );
224 $db->prepareStatements(
false );
225 $db->scrollableCursor(
false );
228 $status->fatal(
'config-connection-error',
$e->getMessage() );
239 $this->parent->showStatusError(
$status );
247 $conn->selectDB( $this->
getVar(
'wgDBname' ) );
249 # Normal user and password are selected after this step, so for now
250 # just copy these two
251 $wgDBuser = $this->
getVar(
'_InstallUser' );
252 $wgDBpassword = $this->
getVar(
'_InstallPassword' );
269 $res = $conn->query(
"SELECT permission_name FROM sys.fn_my_permissions( NULL, 'SERVER' )" );
271 'ALTER ANY LOGIN' =>
false,
272 'CONTROL SERVER' =>
false,
275 foreach (
$res as $row ) {
276 $serverPrivs[$row->permission_name] =
true;
279 if ( !$serverPrivs[
'ALTER ANY LOGIN'] ) {
290 'DELETE' => [
'DELETE',
'CONTROL SERVER' ],
291 'EXECUTE' => [
'EXECUTE',
'CONTROL SERVER' ],
292 'INSERT' => [
'INSERT',
'CONTROL SERVER' ],
293 'SELECT' => [
'SELECT',
'CONTROL SERVER' ],
294 'UPDATE' => [
'UPDATE',
'CONTROL SERVER' ],
297 $grantOptions = array_flip( $this->webUserPrivs );
300 $schemaPrivs = $dbPrivs = [
308 $dbPrivs[
'ALTER ANY USER'] =
false;
311 $conn->selectDB( $this->
getVar(
'wgDBname' ) );
312 $res = $conn->query(
"SELECT permission_name FROM sys.fn_my_permissions( NULL, 'DATABASE' )" );
314 foreach (
$res as $row ) {
315 $dbPrivs[$row->permission_name] =
true;
319 if ( !$dbPrivs[
'ALTER ANY USER'] ) {
325 $res = $conn->query(
"SELECT permission_name FROM sys.fn_my_permissions( "
326 .
"'{$this->getVar( 'wgDBmwschema' )}', 'SCHEMA' )" );
328 foreach (
$res as $row ) {
329 $schemaPrivs[$row->permission_name] =
true;
335 foreach ( $this->webUserPrivs
as $permission ) {
336 if ( ( isset( $schemaPrivs[$permission] ) && $schemaPrivs[$permission] )
337 || ( isset( $dbPrivs[$implied[$permission][0]] )
338 && $dbPrivs[$implied[$permission][0]] )
339 || ( isset( $serverPrivs[$implied[$permission][1]] )
340 && $serverPrivs[$implied[$permission][1]] )
342 unset( $grantOptions[$permission] );
346 if (
count( $grantOptions ) ) {
359 $noCreateMsg =
false;
361 $noCreateMsg =
'config-db-web-no-create-privs';
364 $wrapperStyle = $this->
getVar(
'_SameAccount' ) ?
'display: none' :
'';
365 $displayStyle = $this->
getVar(
'_WebWindowsAuthentication' ) ==
'windowsauth'
371 '_SameAccount',
'config-db-web-account-same',
372 [
'class' =>
'hideShowRadio',
'rel' =>
'dbOtherAccount' ]
374 Html::openElement(
'div', [
'id' =>
'dbOtherAccount',
'style' => $wrapperStyle ] ) .
376 'var' =>
'_WebWindowsAuthentication',
377 'label' =>
'config-mssql-auth',
378 'itemLabelPrefix' =>
'config-mssql-',
379 'values' => [
'sqlauth',
'windowsauth' ],
382 'class' =>
'showHideRadio',
383 'rel' =>
'dbCredentialBox',
386 'class' =>
'hideShowRadio',
387 'rel' =>
'dbCredentialBox',
390 'help' => $this->parent->getHelpBox(
'config-mssql-web-auth' )
392 Html::openElement(
'div', [
'id' =>
'dbCredentialBox',
'style' => $displayStyle ] ) .
393 $this->
getTextBox(
'wgDBuser',
'config-db-username' ) .
397 if ( $noCreateMsg ) {
400 $s .= $this->
getCheckBox(
'_CreateDBAccount',
'config-db-web-create' );
417 '_WebWindowsAuthentication'
420 if ( $this->
getVar(
'_SameAccount' ) ) {
421 $this->
setVar(
'_WebWindowsAuthentication', $this->
getVar(
'_InstallWindowsAuthentication' ) );
422 $this->
setVar(
'wgDBuser', $this->
getVar(
'_InstallUser' ) );
423 $this->
setVar(
'wgDBpassword', $this->
getVar(
'_InstallPassword' ) );
426 if ( $this->
getVar(
'_WebWindowsAuthentication' ) ==
'windowsauth' ) {
427 $this->
setVar(
'wgDBuser',
'' );
428 $this->
setVar(
'wgDBpassword',
'' );
429 $this->
setVar(
'wgDBWindowsAuthentication',
true );
431 $this->
setVar(
'wgDBWindowsAuthentication',
false );
434 if ( $this->
getVar(
'_CreateDBAccount' )
435 && $this->
getVar(
'_WebWindowsAuthentication' ) ==
'sqlauth'
436 && strval( $this->
getVar(
'wgDBpassword' ) ) ==
''
444 $this->
setVar(
'_CreateDBAccount',
false );
447 $create = $this->
getVar(
'_CreateDBAccount' );
453 $password = $this->
getVar(
'wgDBpassword' );
455 if ( $this->
getVar(
'_WebWindowsAuthentication' ) ==
'windowsauth' ) {
456 $user =
'windowsauth';
457 $password =
'windowsauth';
461 Database::factory(
'mssql', [
462 'host' => $this->
getVar(
'wgDBserver' ),
464 'password' => $password,
467 'tablePrefix' => $this->
getVar(
'wgDBprefix' ),
468 'schema' => $this->
getVar(
'wgDBmwschema' ),
479 # Add our user callback to installSteps, right before the tables are created.
482 'callback' => [ $this,
'setupUser' ],
484 $this->parent->addInstallStep( $callback,
'tables' );
497 $dbName = $this->
getVar(
'wgDBname' );
498 $schemaName = $this->
getVar(
'wgDBmwschema' );
501 "CREATE DATABASE " . $conn->addIdentifierQuotes( $dbName ),
505 $conn->selectDB( $dbName );
508 "CREATE SCHEMA " . $conn->addIdentifierQuotes( $schemaName ),
514 "CREATE FULLTEXT CATALOG " . $conn->addIdentifierQuotes( $schemaName ),
527 $dbUser = $this->
getVar(
'wgDBuser' );
528 if ( $dbUser == $this->
getVar(
'_InstallUser' )
529 || ( $this->
getVar(
'_InstallWindowsAuthentication' ) ==
'windowsauth'
530 && $this->
getVar(
'_WebWindowsAuthentication' ) ==
'windowsauth' ) ) {
539 $dbName = $this->
getVar(
'wgDBname' );
540 $this->db->selectDB( $dbName );
541 $password = $this->
getVar(
'wgDBpassword' );
542 $schemaName = $this->
getVar(
'wgDBmwschema' );
544 if ( $this->
getVar(
'_WebWindowsAuthentication' ) ==
'windowsauth' ) {
545 $dbUser =
'windowsauth';
546 $password =
'windowsauth';
549 if ( $this->
getVar(
'_CreateDBAccount' ) ) {
552 $tryToCreate =
false;
555 $escUser = $this->db->addIdentifierQuotes( $dbUser );
556 $escDb = $this->db->addIdentifierQuotes( $dbName );
557 $escSchema = $this->db->addIdentifierQuotes( $schemaName );
558 $grantableNames = [];
559 if ( $tryToCreate ) {
560 $escPass = $this->db->addQuotes( $password );
565 $this->db->selectDB(
'master' );
566 $logintype = $this->
getVar(
'_WebWindowsAuthentication' ) ==
'windowsauth'
568 :
"WITH PASSWORD = $escPass";
569 $this->db->query(
"CREATE LOGIN $escUser $logintype" );
570 $this->db->selectDB( $dbName );
571 $this->db->query(
"CREATE USER $escUser FOR LOGIN $escUser WITH DEFAULT_SCHEMA = $escSchema" );
573 $grantableNames[] = $dbUser;
575 $this->db->rollback();
576 $status->warning(
'config-install-user-create-failed', $dbUser, $dqe->getMessage() );
581 $this->db->selectDB( $dbName );
582 $this->db->query(
"CREATE USER $escUser FOR LOGIN $escUser WITH DEFAULT_SCHEMA = $escSchema" );
584 $grantableNames[] = $dbUser;
586 $this->db->rollback();
587 $status->warning(
'config-install-user-create-failed', $dbUser, $dqe->getMessage() );
590 $status->warning(
'config-install-user-alreadyexists', $dbUser );
591 $grantableNames[] = $dbUser;
596 $this->db->selectDB( $dbName );
597 foreach ( $grantableNames
as $name ) {
601 'BACKUP DATABASE',
'BACKUP LOG',
'CREATE FUNCTION',
'CREATE PROCEDURE',
602 'CREATE TABLE',
'CREATE VIEW',
'CREATE FULLTEXT CATALOG',
'SHOWPLAN'
604 $fullPrivList = implode(
', ', $fullPrivArr );
606 $this->db->query(
"GRANT $fullPrivList ON DATABASE :: $escDb TO $escUser", __METHOD__ );
607 $this->db->query(
"GRANT CONTROL ON SCHEMA :: $escSchema TO $escUser", __METHOD__ );
612 $privList = implode(
', ', $this->webUserPrivs );
613 $this->db->rollback();
615 $this->db->query(
"GRANT $privList ON SCHEMA :: $escSchema TO $escUser", __METHOD__ );
618 $this->db->rollback();
619 $status->fatal(
'config-install-user-grant-failed', $dbUser, $dqe->getMessage() );
625 $this->db->query(
"GRANT SHOWPLAN ON DATABASE :: $escDb TO $escUser", __METHOD__ );
635 $status = parent::createTables();
639 $searchindex = $this->db->tableName(
'searchindex' );
640 $schema = $this->db->addIdentifierQuotes( $this->
getVar(
'wgDBmwschema' ) );
642 $this->db->query(
"CREATE FULLTEXT INDEX ON $searchindex (si_title, si_text) "
643 .
"KEY INDEX si_page ON $schema" );
645 $status->fatal(
'config-install-tables-failed', $dqe->getMessage() );
655 return array_merge( parent::getGlobalDefaults(), [
656 'wgDBmwschema' =>
'mediawiki',
666 $res = $this->db->selectField(
'sys.sql_logins', 1, [
'name' =>
$user ] );
677 $res = $this->db->selectField(
'sys.sysusers', 1, [
'name' =>
$user ] );
687 $res = $this->db->selectField(
'sys.databases', 1, [
'name' => $dbName ] );
698 $res = $this->db->selectField(
'sys.schemas', 1, [
'name' => $schemaName ] );
709 $res = $this->db->selectField(
'sys.fulltext_catalogs', 1, [
'name' => $catalogName ] );
720 'wgDBname' => $this->
getVar(
'wgDBname' ),
721 'wgDBmwschema' => $this->
getVar(
'wgDBmwschema' ),
722 'wgDBuser' => $this->
getVar(
'wgDBuser' ),
723 'wgDBpassword' => $this->
getVar(
'wgDBpassword' ),
730 $windowsauth = $this->
getVar(
'wgDBWindowsAuthentication' ) ?
'true' :
'false';
732 return "# MSSQL specific settings
733 \$wgDBWindowsAuthentication = {$windowsauth};
734 \$wgDBmwschema = \"{$schema}\";
735 \$wgDBprefix = \"{$prefix}\";";
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
static $notMiniumumVerisonMessage
submitConnectForm()
Set variables based on the request array, assuming it was submitted via the form returned by getConne...
loginExists( $user)
Try to see if the login exists.
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.
Status::newGood()` to allow deletion, and then `return false` from the hook function. Ensure you consume the 'ChangeTagAfterDelete' hook to carry out custom deletion actions. $tag:name of the tag $user:user initiating the action & $status:Status object. See above. 'ChangeTagsListActive':Allows you to nominate which of the tags your extension uses are in active use. & $tags:list of all active tags. Append to this array. 'ChangeTagsAfterUpdateTags':Called after tags have been updated with the ChangeTags::updateTags function. Params:$addedTags:tags effectively added in the update $removedTags:tags effectively removed in the update $prevTags:tags that were present prior to the update $rc_id:recentchanges table id $rev_id:revision table id $log_id:logging table id $params:tag params $rc:RecentChange being tagged when the tagging accompanies the action or null $user:User who performed the tagging when the tagging is subsequent to the action or null 'ChangeTagsAllowedAdd':Called when checking if a user can add tags to a change. & $allowedTags:List of all the tags the user is allowed to add. Any tags the user wants to add( $addTags) that are not in this array will cause it to fail. You may add or remove tags to this array as required. $addTags:List of tags user intends to add. $user:User who is adding the tags. 'ChangeUserGroups':Called before user groups are changed. $performer:The User who will perform the change $user:The User whose groups will be changed & $add:The groups that will be added & $remove:The groups that will be removed 'Collation::factory':Called if $wgCategoryCollation is an unknown collation. $collationName:Name of the collation in question & $collationObject:Null. Replace with a subclass of the Collation class that implements the collation given in $collationName. 'ConfirmEmailComplete':Called after a user 's email has been confirmed successfully. $user:user(object) whose email is being confirmed 'ContentAlterParserOutput':Modify parser output for a given content object. Called by Content::getParserOutput after parsing has finished. Can be used for changes that depend on the result of the parsing but have to be done before LinksUpdate is called(such as adding tracking categories based on the rendered HTML). $content:The Content to render $title:Title of the page, as context $parserOutput:ParserOutput to manipulate 'ContentGetParserOutput':Customize parser output for a given content object, called by AbstractContent::getParserOutput. May be used to override the normal model-specific rendering of page content. $content:The Content to render $title:Title of the page, as context $revId:The revision ID, as context $options:ParserOptions for rendering. To avoid confusing the parser cache, the output can only depend on parameters provided to this hook function, not on global state. $generateHtml:boolean, indicating whether full HTML should be generated. If false, generation of HTML may be skipped, but other information should still be present in the ParserOutput object. & $output:ParserOutput, to manipulate or replace 'ContentHandlerDefaultModelFor':Called when the default content model is determined for a given title. May be used to assign a different model for that title. $title:the Title in question & $model:the model name. Use with CONTENT_MODEL_XXX constants. 'ContentHandlerForModelID':Called when a ContentHandler is requested for a given content model name, but no entry for that model exists in $wgContentHandlers. Note:if your extension implements additional models via this hook, please use GetContentModels hook to make them known to core. $modeName:the requested content model name & $handler:set this to a ContentHandler object, if desired. 'ContentModelCanBeUsedOn':Called to determine whether that content model can be used on a given page. This is especially useful to prevent some content models to be used in some special location. $contentModel:ID of the content model in question $title:the Title in question. & $ok:Output parameter, whether it is OK to use $contentModel on $title. Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok. 'ContribsPager::getQueryInfo':Before the contributions query is about to run & $pager:Pager object for contributions & $queryInfo:The query for the contribs Pager 'ContribsPager::reallyDoQuery':Called before really executing the query for My Contributions & $data:an array of results of all contribs queries $pager:The ContribsPager object hooked into $offset:Index offset, inclusive $limit:Exact query limit $descending:Query direction, false for ascending, true for descending 'ContributionsLineEnding':Called before a contributions HTML line is finished $page:SpecialPage object for contributions & $ret:the HTML line $row:the DB row for this line & $classes:the classes to add to the surrounding< li > & $attribs:associative array of other HTML attributes for the< li > element. Currently only data attributes reserved to MediaWiki are allowed(see Sanitizer::isReservedDataAttribute). 'ContributionsToolLinks':Change tool links above Special:Contributions $id:User identifier $title:User page title & $tools:Array of tool links $specialPage:SpecialPage instance for context and services. Can be either SpecialContributions or DeletedContributionsPage. Extensions should type hint against a generic SpecialPage though. 'ConvertContent':Called by AbstractContent::convert when a conversion to another content model is requested. Handler functions that modify $result should generally return false to disable further attempts at conversion. $content:The Content object to be converted. $toModel:The ID of the content model to convert to. $lossy:boolean indicating whether lossy conversion is allowed. & $result:Output parameter, in case the handler function wants to provide a converted Content object. Note that $result->getContentModel() must return $toModel. 'CustomEditor':When invoking the page editor Return true to allow the normal editor to be used, or false if implementing a custom editor, e.g. for a special namespace, etc. $article:Article being edited $user:User performing the edit 'DatabaseOraclePostInit':Called after initialising an Oracle database $db:the DatabaseOracle object 'DeletedContribsPager::reallyDoQuery':Called before really executing the query for Special:DeletedContributions Similar to ContribsPager::reallyDoQuery & $data:an array of results of all contribs queries $pager:The DeletedContribsPager object hooked into $offset:Index offset, inclusive $limit:Exact query limit $descending:Query direction, false for ascending, true for descending 'DeletedContributionsLineEnding':Called before a DeletedContributions HTML line is finished. Similar to ContributionsLineEnding $page:SpecialPage object for DeletedContributions & $ret:the HTML line $row:the DB row for this line & $classes:the classes to add to the surrounding< li > & $attribs:associative array of other HTML attributes for the< li > element. Currently only data attributes reserved to MediaWiki are allowed(see Sanitizer::isReservedDataAttribute). 'DifferenceEngineAfterLoadNewText':called in DifferenceEngine::loadNewText() after the new revision 's content has been loaded into the class member variable $differenceEngine->mNewContent but before returning true from this function. $differenceEngine:DifferenceEngine object 'DifferenceEngineLoadTextAfterNewContentIsLoaded':called in DifferenceEngine::loadText() after the new revision 's content has been loaded into the class member variable $differenceEngine->mNewContent but before checking if the variable 's value is null. This hook can be used to inject content into said class member variable. $differenceEngine:DifferenceEngine object 'DifferenceEngineMarkPatrolledLink':Allows extensions to change the "mark as patrolled" link which is shown both on the diff header as well as on the bottom of a page, usually wrapped in a span element which has class="patrollink". $differenceEngine:DifferenceEngine object & $markAsPatrolledLink:The "mark as patrolled" link HTML(string) $rcid:Recent change ID(rc_id) for this change(int) 'DifferenceEngineMarkPatrolledRCID':Allows extensions to possibly change the rcid parameter. For example the rcid might be set to zero due to the user being the same as the performer of the change but an extension might still want to show it under certain conditions. & $rcid:rc_id(int) of the change or 0 $differenceEngine:DifferenceEngine object $change:RecentChange object $user:User object representing the current user 'DifferenceEngineNewHeader':Allows extensions to change the $newHeader variable, which contains information about the new revision, such as the revision 's author, whether the revision was marked as a minor edit or not, etc. $differenceEngine:DifferenceEngine object & $newHeader:The string containing the various #mw-diff-otitle[1-5] divs, which include things like revision author info, revision comment, RevisionDelete link and more $formattedRevisionTools:Array containing revision tools, some of which may have been injected with the DiffRevisionTools hook $nextlink:String containing the link to the next revision(if any) $status
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 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
createTables()
Create database tables from scratch.
$wgDBpassword
Database user's password.
getLocalSettings()
Get the DBMS-specific options for LocalSettings.php generation.
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>".
$wgDBWindowsAuthentication
Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server.
getPasswordBox( $var, $label, $attribs=[], $helpData="")
Get a labelled password box to configure a local variable.
getSchemaVars()
Get variables to substitute into tables.sql and the SQL patch files.
setupSchemaVars()
Set appropriate schema variables in the current database connection.
when a variable name is used in a it is silently declared as a new masking the global
getRadioSet( $params)
Get a set of labelled radio buttons.
catalogExists( $catalogName)
Try to see if a given fulltext catalog exists We assume we already have the appropriate database sele...
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException' returning false will NOT prevent logging $e
userExists( $user)
Try to see if the user account exists We assume we already have the appropriate database selected.
getVar( $var, $default=null)
Get a variable, taking local defaults into account.
static newGood( $value=null)
Factory function for good results.
preInstall()
Allow DB installers a chance to make last-minute changes before installation occurs.
schemaExists( $schemaName)
Try to see if a given schema exists We assume we already have the appropriate database selected.
Base class for DBMS-specific installation helper classes.
preUpgrade()
Allow DB installers a chance to make checks before upgrade.
databaseExists( $dbName)
Try to see if a given database exists.
Class for setting up the MediaWiki database using Microsoft SQL Server.
canCreateAccounts()
Return true if the install user can create accounts.
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 '/'...
setVar( $name, $value)
Convenience alias for $this->parent->setVar()
setVarsFromRequest( $varNames)
Convenience function to set variables based on form data.
static escapePhpString( $string)
Returns the escaped version of a string of php code.
getGlobalDefaults()
Get a name=>value map of MW configuration globals for the default values.
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 "<
$wgDBuser
Database username.
Database $db
The database connection.
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
getCheckBox( $var, $label, $attribs=[], $helpData="")
Get a labelled checkbox to configure a local boolean variable.