X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstallerName.php;h=dcd30cf2bc10693fd4af5bb71a01da2b606cd903;hb=e3c97b32f634254fa3aae50d417fec15f0bf0c2a;hp=717d67b89c0d4add4039176cd2ebe10038f6fa25;hpb=c9f533269658eff1919b371c6db3f4507f4587a1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstallerName.php b/includes/installer/WebInstallerName.php index 717d67b89c..dcd30cf2bc 100644 --- a/includes/installer/WebInstallerName.php +++ b/includes/installer/WebInstallerName.php @@ -51,65 +51,65 @@ class WebInstallerName extends WebInstallerPage { ); $this->addHTML( - $this->parent->getTextBox( array( + $this->parent->getTextBox( [ 'var' => 'wgSitename', 'label' => 'config-site-name', 'help' => $this->parent->getHelpBox( 'config-site-name-help' ) - ) ) . + ] ) . // getRadioSet() builds a set of labeled radio buttons. // For grep: The following messages are used as the item labels: // config-ns-site-name, config-ns-generic, config-ns-other - $this->parent->getRadioSet( array( + $this->parent->getRadioSet( [ 'var' => '_NamespaceType', 'label' => 'config-project-namespace', 'itemLabelPrefix' => 'config-ns-', - 'values' => array( 'site-name', 'generic', 'other' ), - 'commonAttribs' => array( 'class' => 'enableForOther', - 'rel' => 'config_wgMetaNamespace' ), + 'values' => [ 'site-name', 'generic', 'other' ], + 'commonAttribs' => [ 'class' => 'enableForOther', + 'rel' => 'config_wgMetaNamespace' ], 'help' => $this->parent->getHelpBox( 'config-project-namespace-help' ) - ) ) . - $this->parent->getTextBox( array( + ] ) . + $this->parent->getTextBox( [ 'var' => 'wgMetaNamespace', 'label' => '', // @todo Needs a label? - 'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' ) - ) ) . - $this->getFieldSetStart( 'config-admin-box' ) . - $this->parent->getTextBox( array( + 'attribs' => [ 'readonly' => 'readonly', 'class' => 'enabledByOther' ] + ] ) . + $this->getFieldsetStart( 'config-admin-box' ) . + $this->parent->getTextBox( [ 'var' => '_AdminName', 'label' => 'config-admin-name', 'help' => $this->parent->getHelpBox( 'config-admin-help' ) - ) ) . - $this->parent->getPasswordBox( array( + ] ) . + $this->parent->getPasswordBox( [ 'var' => '_AdminPassword', 'label' => 'config-admin-password', - ) ) . - $this->parent->getPasswordBox( array( + ] ) . + $this->parent->getPasswordBox( [ 'var' => '_AdminPasswordConfirm', 'label' => 'config-admin-password-confirm' - ) ) . - $this->parent->getTextBox( array( + ] ) . + $this->parent->getTextBox( [ 'var' => '_AdminEmail', - 'attribs' => array( + 'attribs' => [ 'dir' => 'ltr', - ), + ], 'label' => 'config-admin-email', 'help' => $this->parent->getHelpBox( 'config-admin-email-help' ) - ) ) . - $this->parent->getCheckBox( array( + ] ) . + $this->parent->getCheckBox( [ 'var' => '_Subscribe', 'label' => 'config-subscribe', 'help' => $this->parent->getHelpBox( 'config-subscribe-help' ) - ) ) . - $this->getFieldSetEnd() . + ] ) . + $this->getFieldsetEnd() . $this->parent->getInfoBox( wfMessage( 'config-almost-done' )->text() ) . // getRadioSet() builds a set of labeled radio buttons. // For grep: The following messages are used as the item labels: // config-optional-continue, config-optional-skip - $this->parent->getRadioSet( array( + $this->parent->getRadioSet( [ 'var' => '_SkipOptional', 'itemLabelPrefix' => 'config-optional-', - 'values' => array( 'continue', 'skip' ) - ) ) + 'values' => [ 'continue', 'skip' ] + ] ) ); // Restore the default value @@ -127,9 +127,9 @@ class WebInstallerName extends WebInstallerPage { global $wgPasswordPolicy; $retVal = true; - $this->parent->setVarsFromRequest( array( 'wgSitename', '_NamespaceType', + $this->parent->setVarsFromRequest( [ 'wgSitename', '_NamespaceType', '_AdminName', '_AdminPassword', '_AdminPasswordConfirm', '_AdminEmail', - '_Subscribe', '_SkipOptional', 'wgMetaNamespace' ) ); + '_Subscribe', '_SkipOptional', 'wgMetaNamespace' ] ); // Validate site name if ( strval( $this->getVar( 'wgSitename' ) ) === '' ) { @@ -209,7 +209,7 @@ class WebInstallerName extends WebInstallerPage { $status = $upp->checkUserPasswordForGroups( $user, $pwd, - array( 'bureaucrat', 'sysop' ) // per Installer::createSysop() + [ 'bureaucrat', 'sysop' ] // per Installer::createSysop() ); $valid = $status->isGood() ? true : $status->getMessage(); } else { @@ -224,7 +224,7 @@ class WebInstallerName extends WebInstallerPage { $msg = $valid; } if ( $msg !== false ) { - call_user_func( array( $this->parent, 'showError' ), $msg ); + call_user_func( [ $this->parent, 'showError' ], $msg ); $this->setVar( '_AdminPassword', '' ); $this->setVar( '_AdminPasswordConfirm', '' ); $retVal = false;