X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FFormAction.php;h=e94a18880ed434ed9cc0abada21cd1776ff577e2;hb=616ed766f37c77a2aa02ed211b40ec7c4f972239;hp=55b9b991ee9d30283e42a9ba385aad13a990c655;hpb=096c8c08c058ed8d899e412d459f4b86b5ab7c62;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/FormAction.php b/includes/actions/FormAction.php index 55b9b991ee..e94a18880e 100644 --- a/includes/actions/FormAction.php +++ b/includes/actions/FormAction.php @@ -33,7 +33,7 @@ abstract class FormAction extends Action { */ protected function getFormFields() { // Default to an empty form with just a submit button - return array(); + return []; } /** @@ -66,17 +66,17 @@ abstract class FormAction extends Action { $this->fields = $this->getFormFields(); // Give hooks a chance to alter the form, adding extra fields or text etc - Hooks::run( 'ActionModifyFormFields', array( $this->getName(), &$this->fields, $this->page ) ); + Hooks::run( 'ActionModifyFormFields', [ $this->getName(), &$this->fields, $this->page ] ); $form = new HTMLForm( $this->fields, $this->getContext(), $this->getName() ); - $form->setSubmitCallback( array( $this, 'onSubmit' ) ); + $form->setSubmitCallback( [ $this, 'onSubmit' ] ); $title = $this->getTitle(); - $form->setAction( $title->getLocalURL( array( 'action' => $this->getName() ) ) ); + $form->setAction( $title->getLocalURL( [ 'action' => $this->getName() ] ) ); // Retain query parameters (uselang etc) $params = array_diff_key( $this->getRequest()->getQueryValues(), - array( 'action' => null, 'title' => null ) + [ 'action' => null, 'title' => null ] ); if ( $params ) { $form->addHiddenField( 'redirectparams', wfArrayToCgi( $params ) ); @@ -87,7 +87,7 @@ abstract class FormAction extends Action { $this->alterForm( $form ); // Give hooks a chance to alter the form, adding extra fields or text etc - Hooks::run( 'ActionBeforeFormDisplay', array( $this->getName(), &$form, $this->page ) ); + Hooks::run( 'ActionBeforeFormDisplay', [ $this->getName(), &$form, $this->page ] ); return $form; }