MediaWiki  master
DatabaseInstaller.php
Go to the documentation of this file.
1 <?php
29 
37 abstract class DatabaseInstaller {
38 
44  public $parent;
45 
49  public static $minimumVersion;
50 
54  protected static $notMinimumVersionMessage;
55 
61  public $db = null;
62 
68  protected $internalDefaults = [];
69 
75  protected $globalNames = [];
76 
84  public static function meetsMinimumRequirement( $serverVersion ) {
85  if ( version_compare( $serverVersion, static::$minimumVersion ) < 0 ) {
86  return Status::newFatal(
87  static::$notMinimumVersionMessage, static::$minimumVersion, $serverVersion
88  );
89  }
90 
91  return Status::newGood();
92  }
93 
97  abstract public function getName();
98 
102  abstract public function isCompiled();
103 
110  public function checkPrerequisites() {
111  return Status::newGood();
112  }
113 
121  abstract public function getConnectForm();
122 
132  abstract public function submitConnectForm();
133 
142  public function getSettingsForm() {
143  return false;
144  }
145 
153  public function submitSettingsForm() {
154  return Status::newGood();
155  }
156 
165  abstract public function openConnection();
166 
173  abstract public function setupDatabase();
174 
186  public function getConnection() {
187  if ( $this->db ) {
188  return Status::newGood( $this->db );
189  }
190 
191  $status = $this->openConnection();
192  if ( $status->isOK() ) {
193  $this->db = $status->value;
194  // Enable autocommit
195  $this->db->clearFlag( DBO_TRX );
196  $this->db->commit( __METHOD__ );
197  }
198 
199  return $status;
200  }
201 
210  private function stepApplySourceFile(
211  $sourceFileMethod,
212  $stepName,
213  $archiveTableMustNotExist = false
214  ) {
215  $status = $this->getConnection();
216  if ( !$status->isOK() ) {
217  return $status;
218  }
219  $this->db->selectDB( $this->getVar( 'wgDBname' ) );
220 
221  if ( $archiveTableMustNotExist && $this->db->tableExists( 'archive', __METHOD__ ) ) {
222  $status->warning( "config-$stepName-tables-exist" );
223  $this->enableLB();
224 
225  return $status;
226  }
227 
228  $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
229  $this->db->begin( __METHOD__ );
230 
231  // @phan-suppress-next-line SecurityCheck-PathTraversal False positive
232  $error = $this->db->sourceFile(
233  call_user_func( [ $this, $sourceFileMethod ], $this->db )
234  );
235  if ( $error !== true ) {
236  $this->db->reportQueryError( $error, 0, '', __METHOD__ );
237  $this->db->rollback( __METHOD__ );
238  $status->fatal( "config-$stepName-tables-failed", $error );
239  } else {
240  $this->db->commit( __METHOD__ );
241  }
242  // Resume normal operations
243  if ( $status->isOK() ) {
244  $this->enableLB();
245  }
246 
247  return $status;
248  }
249 
256  public function createTables() {
257  return $this->stepApplySourceFile( 'getGeneratedSchemaPath', 'install', true );
258  }
259 
266  public function createManualTables() {
267  // TODO: Set "archiveTableMustNotExist" to "false" when archive table is migrated to tables.json
268  return $this->stepApplySourceFile( 'getSchemaPath', 'install-manual', true );
269  }
270 
277  public function insertUpdateKeys() {
278  return $this->stepApplySourceFile( 'getUpdateKeysPath', 'updates', false );
279  }
280 
289  private function getSqlFilePath( $db, $filename ) {
290  global $IP;
291 
292  $dbmsSpecificFilePath = "$IP/maintenance/" . $db->getType() . "/$filename";
293  if ( file_exists( $dbmsSpecificFilePath ) ) {
294  return $dbmsSpecificFilePath;
295  } else {
296  return "$IP/maintenance/$filename";
297  }
298  }
299 
308  public function getSchemaPath( $db ) {
309  return $this->getSqlFilePath( $db, 'tables.sql' );
310  }
311 
319  public function getGeneratedSchemaPath( $db ) {
320  return $this->getSqlFilePath( $db, 'tables-generated.sql' );
321  }
322 
331  public function getUpdateKeysPath( $db ) {
332  return $this->getSqlFilePath( $db, 'update-keys.sql' );
333  }
334 
340  public function createExtensionTables() {
341  $status = $this->getConnection();
342  if ( !$status->isOK() ) {
343  return $status;
344  }
345 
346  // Now run updates to create tables for old extensions
347  $updater = DatabaseUpdater::newForDB( $this->db );
348  $updater->setAutoExtensionHookContainer( $this->parent->getAutoExtensionHookContainer() );
349  $updater->doUpdates( [ 'extensions' ] );
350 
351  return $status;
352  }
353 
359  abstract public function getLocalSettings();
360 
367  public function getSchemaVars() {
368  return [];
369  }
370 
379  public function setupSchemaVars() {
380  $status = $this->getConnection();
381  if ( $status->isOK() ) {
382  // @phan-suppress-next-line PhanUndeclaredMethod
383  $status->value->setSchemaVars( $this->getSchemaVars() );
384  } else {
385  $msg = __METHOD__ . ': unexpected error while establishing'
386  . ' a database connection with message: '
387  . $status->getMessage()->plain();
388  throw new MWException( $msg );
389  }
390  }
391 
397  public function enableLB() {
398  $status = $this->getConnection();
399  if ( !$status->isOK() ) {
400  throw new MWException( __METHOD__ . ': unexpected DB connection error' );
401  }
402  $connection = $status->value;
403 
404  $this->parent->resetMediaWikiServices( null, [
405  'DBLoadBalancerFactory' => function () use ( $connection ) {
406  return LBFactorySingle::newFromConnection( $connection );
407  }
408  ] );
409  }
410 
417  public function doUpgrade() {
418  $this->setupSchemaVars();
419  $this->enableLB();
420 
421  $ret = true;
422  ob_start( [ $this, 'outputHandler' ] );
423  $up = DatabaseUpdater::newForDB( $this->db );
424  try {
425  $up->doUpdates();
426  $up->purgeCache();
427  } catch ( MWException $e ) {
428  echo "\nAn error occurred:\n";
429  echo $e->getText();
430  $ret = false;
431  } catch ( Exception $e ) {
432  echo "\nAn error occurred:\n";
433  echo $e->getMessage();
434  $ret = false;
435  }
436  ob_end_flush();
437 
438  return $ret;
439  }
440 
447  public function preInstall() {
448  }
449 
454  public function preUpgrade() {
455  }
456 
462  public function getGlobalNames() {
463  return $this->globalNames;
464  }
465 
472  public function __construct( $parent ) {
473  $this->parent = $parent;
474  }
475 
483  protected static function checkExtension( $name ) {
484  return extension_loaded( $name );
485  }
486 
492  public function getReadableName() {
493  // Messages: config-type-mysql, config-type-postgres, config-type-sqlite
494  return wfMessage( 'config-type-' . $this->getName() )->text();
495  }
496 
502  public function getGlobalDefaults() {
503  $defaults = [];
504  foreach ( $this->getGlobalNames() as $var ) {
505  if ( isset( $GLOBALS[$var] ) ) {
506  $defaults[$var] = $GLOBALS[$var];
507  }
508  }
509  return $defaults;
510  }
511 
516  public function getInternalDefaults() {
518  }
519 
526  public function getVar( $var, $default = null ) {
527  $defaults = $this->getGlobalDefaults();
528  $internal = $this->getInternalDefaults();
529  if ( isset( $defaults[$var] ) ) {
530  $default = $defaults[$var];
531  } elseif ( isset( $internal[$var] ) ) {
532  $default = $internal[$var];
533  }
534 
535  return $this->parent->getVar( $var, $default );
536  }
537 
543  public function setVar( $name, $value ) {
544  $this->parent->setVar( $name, $value );
545  }
546 
557  public function getTextBox( $var, $label, $attribs = [], $helpData = "" ) {
558  $name = $this->getName() . '_' . $var;
559  $value = $this->getVar( $var );
560  if ( !isset( $attribs ) ) {
561  $attribs = [];
562  }
563 
564  return $this->parent->getTextBox( [
565  'var' => $var,
566  'label' => $label,
567  'attribs' => $attribs,
568  'controlName' => $name,
569  'value' => $value,
570  'help' => $helpData
571  ] );
572  }
573 
585  public function getPasswordBox( $var, $label, $attribs = [], $helpData = "" ) {
586  $name = $this->getName() . '_' . $var;
587  $value = $this->getVar( $var );
588  if ( !isset( $attribs ) ) {
589  $attribs = [];
590  }
591 
592  return $this->parent->getPasswordBox( [
593  'var' => $var,
594  'label' => $label,
595  'attribs' => $attribs,
596  'controlName' => $name,
597  'value' => $value,
598  'help' => $helpData
599  ] );
600  }
601 
611  public function getCheckBox( $var, $label, $attribs = [], $helpData = "" ) {
612  $name = $this->getName() . '_' . $var;
613  $value = $this->getVar( $var );
614 
615  return $this->parent->getCheckBox( [
616  'var' => $var,
617  'label' => $label,
618  'attribs' => $attribs,
619  'controlName' => $name,
620  'value' => $value,
621  'help' => $helpData
622  ] );
623  }
624 
637  public function getRadioSet( $params ) {
638  $params['controlName'] = $this->getName() . '_' . $params['var'];
639  $params['value'] = $this->getVar( $params['var'] );
640 
641  return $this->parent->getRadioSet( $params );
642  }
643 
651  public function setVarsFromRequest( $varNames ) {
652  return $this->parent->setVarsFromRequest( $varNames, $this->getName() . '_' );
653  }
654 
666  public function needsUpgrade() {
667  $status = $this->getConnection();
668  if ( !$status->isOK() ) {
669  return false;
670  }
671 
672  try {
673  $this->db->selectDB( $this->getVar( 'wgDBname' ) );
674  } catch ( DBConnectionError $e ) {
675  // Don't catch DBConnectionError
676  throw $e;
677  } catch ( DBExpectedError $e ) {
678  return false;
679  }
680 
681  return $this->db->tableExists( 'cur', __METHOD__ ) ||
682  $this->db->tableExists( 'revision', __METHOD__ );
683  }
684 
690  public function getInstallUserBox() {
691  return Html::openElement( 'fieldset' ) .
692  Html::element( 'legend', [], wfMessage( 'config-db-install-account' )->text() ) .
693  // @phan-suppress-next-line SecurityCheck-DoubleEscaped taint cannot track the helpbox from the rest
694  $this->getTextBox(
695  '_InstallUser',
696  'config-db-username',
697  [ 'dir' => 'ltr' ],
698  $this->parent->getHelpBox( 'config-db-install-username' )
699  ) .
700  // @phan-suppress-next-line SecurityCheck-DoubleEscaped taint cannot track the helpbox from the rest
701  $this->getPasswordBox(
702  '_InstallPassword',
703  'config-db-password',
704  [ 'dir' => 'ltr' ],
705  $this->parent->getHelpBox( 'config-db-install-password' )
706  ) .
707  Html::closeElement( 'fieldset' );
708  }
709 
714  public function submitInstallUserBox() {
715  $this->setVarsFromRequest( [ '_InstallUser', '_InstallPassword' ] );
716 
717  return Status::newGood();
718  }
719 
727  public function getWebUserBox( $noCreateMsg = false ) {
728  $wrapperStyle = $this->getVar( '_SameAccount' ) ? 'display: none' : '';
729  $s = Html::openElement( 'fieldset' ) .
730  Html::element( 'legend', [], wfMessage( 'config-db-web-account' )->text() ) .
731  $this->getCheckBox(
732  '_SameAccount', 'config-db-web-account-same',
733  [ 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' ]
734  ) .
735  Html::openElement( 'div', [ 'id' => 'dbOtherAccount', 'style' => $wrapperStyle ] ) .
736  $this->getTextBox( 'wgDBuser', 'config-db-username' ) .
737  $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) .
738  $this->parent->getHelpBox( 'config-db-web-help' );
739  if ( $noCreateMsg ) {
740  $s .= Html::warningBox( wfMessage( $noCreateMsg )->plain(), 'config-warning-box' );
741  } else {
742  $s .= $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create' );
743  }
744  $s .= Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' );
745 
746  return $s;
747  }
748 
754  public function submitWebUserBox() {
755  $this->setVarsFromRequest(
756  [ 'wgDBuser', 'wgDBpassword', '_SameAccount', '_CreateDBAccount' ]
757  );
758 
759  if ( $this->getVar( '_SameAccount' ) ) {
760  $this->setVar( 'wgDBuser', $this->getVar( '_InstallUser' ) );
761  $this->setVar( 'wgDBpassword', $this->getVar( '_InstallPassword' ) );
762  }
763 
764  if ( $this->getVar( '_CreateDBAccount' ) && strval( $this->getVar( 'wgDBpassword' ) ) == '' ) {
765  return Status::newFatal( 'config-db-password-empty', $this->getVar( 'wgDBuser' ) );
766  }
767 
768  return Status::newGood();
769  }
770 
777  public function populateInterwikiTable() {
778  $status = $this->getConnection();
779  if ( !$status->isOK() ) {
780  return $status;
781  }
782  $this->db->selectDB( $this->getVar( 'wgDBname' ) );
783 
784  if ( $this->db->selectRow( 'interwiki', '1', [], __METHOD__ ) ) {
785  $status->warning( 'config-install-interwiki-exists' );
786 
787  return $status;
788  }
789  global $IP;
790  Wikimedia\suppressWarnings();
791  $rows = file( "$IP/maintenance/interwiki.list",
792  FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES );
793  Wikimedia\restoreWarnings();
794  $interwikis = [];
795  if ( !$rows ) {
796  return Status::newFatal( 'config-install-interwiki-list' );
797  }
798  foreach ( $rows as $row ) {
799  $row = preg_replace( '/^\s*([^#]*?)\s*(#.*)?$/', '\\1', $row ); // strip comments - whee
800  if ( $row == "" ) {
801  continue;
802  }
803  $row .= "|";
804  $interwikis[] = array_combine(
805  [ 'iw_prefix', 'iw_url', 'iw_local', 'iw_api', 'iw_wikiid' ],
806  explode( '|', $row )
807  );
808  }
809  $this->db->insert( 'interwiki', $interwikis, __METHOD__ );
810 
811  return Status::newGood();
812  }
813 
814  public function outputHandler( $string ) {
815  return htmlspecialchars( $string );
816  }
817 }
DatabaseInstaller\createManualTables
createManualTables()
Create database tables from scratch.
Definition: DatabaseInstaller.php:266
DatabaseInstaller\$globalNames
array $globalNames
Array of MW configuration globals this class uses.
Definition: DatabaseInstaller.php:75
Wikimedia\Rdbms\Database
Relational database abstraction object.
Definition: Database.php:50
DatabaseUpdater\newForDB
static newForDB(IMaintainableDatabase $db, $shared=false, Maintenance $maintenance=null)
Definition: DatabaseUpdater.php:205
StatusValue\newFatal
static newFatal( $message,... $parameters)
Factory function for fatal errors.
Definition: StatusValue.php:70
DatabaseInstaller\getGeneratedSchemaPath
getGeneratedSchemaPath( $db)
Return a path to the DBMS-specific automatically generated schema file.
Definition: DatabaseInstaller.php:319
DatabaseInstaller\checkExtension
static checkExtension( $name)
Convenience function.
Definition: DatabaseInstaller.php:483
DatabaseInstaller\doUpgrade
doUpgrade()
Perform database upgrades.
Definition: DatabaseInstaller.php:417
WebInstaller
Class for the core installer web interface.
Definition: WebInstaller.php:32
DatabaseInstaller\getConnection
getConnection()
Connect to the database using the administrative user/password currently defined in the session.
Definition: DatabaseInstaller.php:186
DatabaseInstaller\getTextBox
getTextBox( $var, $label, $attribs=[], $helpData="")
Get a labelled text box to configure a local variable.
Definition: DatabaseInstaller.php:557
wfMessage
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Definition: GlobalFunctions.php:1230
DatabaseInstaller\checkPrerequisites
checkPrerequisites()
Checks for installation prerequisites other than those checked by isCompiled() Stable to override.
Definition: DatabaseInstaller.php:110
DatabaseInstaller\getSchemaVars
getSchemaVars()
Override this to provide DBMS-specific schema variables, to be substituted into tables....
Definition: DatabaseInstaller.php:367
$s
$s
Definition: mergeMessageFileList.php:186
Html\warningBox
static warningBox( $html, $className='')
Return a warning box.
Definition: Html.php:734
DatabaseInstaller\preUpgrade
preUpgrade()
Allow DB installers a chance to make checks before upgrade.
Definition: DatabaseInstaller.php:454
DatabaseInstaller\preInstall
preInstall()
Allow DB installers a chance to make last-minute changes before installation occurs.
Definition: DatabaseInstaller.php:447
DatabaseInstaller\submitSettingsForm
submitSettingsForm()
Set variables based on the request array, assuming it was submitted via the form return by getSetting...
Definition: DatabaseInstaller.php:153
DatabaseInstaller\getLocalSettings
getLocalSettings()
Get the DBMS-specific options for LocalSettings.php generation.
DBO_TRX
const DBO_TRX
Definition: defines.php:12
DatabaseInstaller\getReadableName
getReadableName()
Get the internationalised name for this DBMS.
Definition: DatabaseInstaller.php:492
Wikimedia\Rdbms\IDatabase
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:38
DatabaseInstaller\createTables
createTables()
Create database tables from scratch from the automatically generated file Stable to override.
Definition: DatabaseInstaller.php:256
DatabaseInstaller\getInternalDefaults
getInternalDefaults()
Get a name=>value map of internal variables used during installation.
Definition: DatabaseInstaller.php:516
Html\closeElement
static closeElement( $element)
Returns "</$element>".
Definition: Html.php:318
DatabaseInstaller\getSqlFilePath
getSqlFilePath( $db, $filename)
Return a path to the DBMS-specific SQL file if it exists, otherwise default SQL file.
Definition: DatabaseInstaller.php:289
DatabaseInstaller\getConnectForm
getConnectForm()
Get HTML for a web form that configures this database.
MWException
MediaWiki exception.
Definition: MWException.php:29
DatabaseInstaller\getPasswordBox
getPasswordBox( $var, $label, $attribs=[], $helpData="")
Get a labelled password box to configure a local variable.
Definition: DatabaseInstaller.php:585
Wikimedia\Rdbms\LBFactorySingle
An LBFactory class that always returns a single database object.
Definition: LBFactorySingle.php:32
MWException\getText
getText()
Get the text to display when reporting the error on the command line.
Definition: MWException.php:149
DatabaseInstaller\submitConnectForm
submitConnectForm()
Set variables based on the request array, assuming it was submitted via the form returned by getConne...
DatabaseInstaller\getUpdateKeysPath
getUpdateKeysPath( $db)
Return a path to the DBMS-specific update key file, otherwise default to update-keys....
Definition: DatabaseInstaller.php:331
DatabaseInstaller\submitWebUserBox
submitWebUserBox()
Submit the form from getWebUserBox().
Definition: DatabaseInstaller.php:754
DatabaseInstaller\$minimumVersion
static string $minimumVersion
Set by subclasses.
Definition: DatabaseInstaller.php:49
DatabaseInstaller\getName
getName()
Return the internal name, e.g.
DatabaseInstaller\outputHandler
outputHandler( $string)
Definition: DatabaseInstaller.php:814
DatabaseInstaller\setupSchemaVars
setupSchemaVars()
Set appropriate schema variables in the current database connection.
Definition: DatabaseInstaller.php:379
DatabaseInstaller\getSchemaPath
getSchemaPath( $db)
Return a path to the DBMS-specific schema file, otherwise default to tables.sql Stable to override.
Definition: DatabaseInstaller.php:308
DatabaseInstaller\getWebUserBox
getWebUserBox( $noCreateMsg=false)
Get a standard web-user fieldset.
Definition: DatabaseInstaller.php:727
DatabaseInstaller\getRadioSet
getRadioSet( $params)
Get a set of labelled radio buttons.
Definition: DatabaseInstaller.php:637
DatabaseInstaller\stepApplySourceFile
stepApplySourceFile( $sourceFileMethod, $stepName, $archiveTableMustNotExist=false)
Apply a SQL source file to the database as part of running an installation step.
Definition: DatabaseInstaller.php:210
DatabaseInstaller\getGlobalDefaults
getGlobalDefaults()
Get a name=>value map of MW configuration globals for the default values.
Definition: DatabaseInstaller.php:502
DatabaseInstaller\getVar
getVar( $var, $default=null)
Get a variable, taking local defaults into account.
Definition: DatabaseInstaller.php:526
StatusValue\newGood
static newGood( $value=null)
Factory function for good results.
Definition: StatusValue.php:82
DBO_DDLMODE
const DBO_DDLMODE
Definition: defines.php:16
DatabaseInstaller\createExtensionTables
createExtensionTables()
Create the tables for each extension the user enabled Stable to override.
Definition: DatabaseInstaller.php:340
DatabaseInstaller\submitInstallUserBox
submitInstallUserBox()
Submit a standard install user fieldset.
Definition: DatabaseInstaller.php:714
DatabaseInstaller
Base class for DBMS-specific installation helper classes.
Definition: DatabaseInstaller.php:37
DatabaseInstaller\getGlobalNames
getGlobalNames()
Get an array of MW configuration globals that will be configured by this class.
Definition: DatabaseInstaller.php:462
DatabaseInstaller\getSettingsForm
getSettingsForm()
Get HTML for a web form that retrieves settings used for installation.
Definition: DatabaseInstaller.php:142
Wikimedia\Rdbms\DBExpectedError
Base class for the more common types of database errors.
Definition: DBExpectedError.php:34
DatabaseInstaller\openConnection
openConnection()
Open a connection to the database using the administrative user/password currently defined in the ses...
DatabaseInstaller\$notMinimumVersionMessage
static string $notMinimumVersionMessage
Set by subclasses.
Definition: DatabaseInstaller.php:54
DatabaseInstaller\enableLB
enableLB()
Set up LBFactory so that wfGetDB() etc.
Definition: DatabaseInstaller.php:397
DatabaseInstaller\populateInterwikiTable
populateInterwikiTable()
Common function for databases that don't understand the MySQLish syntax of interwiki....
Definition: DatabaseInstaller.php:777
Html\openElement
static openElement( $element, $attribs=[])
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
Definition: Html.php:254
DatabaseInstaller\setVar
setVar( $name, $value)
Convenience alias for $this->parent->setVar()
Definition: DatabaseInstaller.php:543
DatabaseInstaller\getInstallUserBox
getInstallUserBox()
Get a standard install-user fieldset.
Definition: DatabaseInstaller.php:690
DatabaseInstaller\setVarsFromRequest
setVarsFromRequest( $varNames)
Convenience function to set variables based on form data.
Definition: DatabaseInstaller.php:651
Wikimedia\Rdbms\DBConnectionError
@newable
Definition: DBConnectionError.php:27
Wikimedia\Rdbms\IDatabase\getType
getType()
Get the type of the DBMS (e.g.
DatabaseInstaller\meetsMinimumRequirement
static meetsMinimumRequirement( $serverVersion)
Whether the provided version meets the necessary requirements for this type.
Definition: DatabaseInstaller.php:84
DatabaseInstaller\$parent
WebInstaller $parent
The Installer object.
Definition: DatabaseInstaller.php:44
DatabaseInstaller\isCompiled
isCompiled()
DatabaseInstaller\$db
Database $db
The database connection.
Definition: DatabaseInstaller.php:61
DatabaseInstaller\setupDatabase
setupDatabase()
Create the database and return a Status object indicating success or failure.
DatabaseInstaller\insertUpdateKeys
insertUpdateKeys()
Insert update keys into table to prevent running unneded updates.
Definition: DatabaseInstaller.php:277
Html\element
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:234
$IP
$IP
Definition: WebStart.php:49
DatabaseInstaller\$internalDefaults
array $internalDefaults
Internal variables for installation.
Definition: DatabaseInstaller.php:68
DatabaseInstaller\getCheckBox
getCheckBox( $var, $label, $attribs=[], $helpData="")
Get a labelled checkbox to configure a local boolean variable.
Definition: DatabaseInstaller.php:611
DatabaseInstaller\__construct
__construct( $parent)
Construct and initialise parent.
Definition: DatabaseInstaller.php:472
DatabaseInstaller\needsUpgrade
needsUpgrade()
Determine whether an existing installation of MediaWiki is present in the configured administrative c...
Definition: DatabaseInstaller.php:666