20 $this->webInstaller->getHelpBox(
'config-db-host-help' )
23 "<span class=\"cdx-card\"><span class=\"cdx-card__text\">" .
26 [
'class' =>
'cdx-card__text__title' ],
27 wfMessage(
'config-db-wiki-settings' )->text()
29 "<span class=\"cdx-card__text__description\">" .
30 $this->
getTextBox(
'wgDBname',
'config-db-name', [
'dir' =>
'ltr' ],
31 $this->webInstaller->getHelpBox(
'config-db-name-help' ) ) .
32 $this->
getTextBox(
'wgDBprefix',
'config-db-prefix', [
'dir' =>
'ltr' ],
33 $this->webInstaller->getHelpBox(
'config-db-prefix-help' ) ) .
34 "</span></span></span>" .
41 $newValues = $this->
setVarsFromRequest( [
'wgDBserver',
'wgDBname',
'wgDBprefix',
'wgDBssl' ] );
44 $status = Status::newGood();
45 if ( ( $newValues[
'wgDBserver'] ??
'' ) ===
'' ) {
46 $status->fatal(
'config-missing-db-host' );
48 if ( ( $newValues[
'wgDBname'] ??
'' ) ===
'' ) {
49 $status->fatal(
'config-missing-db-name' );
50 } elseif ( !preg_match(
'/^[a-z0-9+_-]+$/i', $newValues[
'wgDBname'] ) ) {
51 $status->fatal(
'config-invalid-db-name', $newValues[
'wgDBname'] );
53 if ( !preg_match(
'/^[a-z0-9_-]*$/i', $newValues[
'wgDBprefix'] ) ) {
54 $status->fatal(
'config-invalid-db-prefix', $newValues[
'wgDBprefix'] );
56 if ( !$status->isOK() ) {
62 if ( !$status->isOK() ) {
68 if ( !$status->isOK() ) {
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
const CONN_CREATE_DATABASE
A connection for creating DBs, suitable for pre-installation.