X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FFormSpecialPage.php;h=c28c4569655826f7cc4ec503c4d0a8b2c298df08;hb=fb7b3eebeb8de47eb42e8d6ccf204106a2d6d9e4;hp=42c59806b429e4f2a70e1ad59cdd7d1be1e6acd5;hpb=266dbe55e8c752654a1041a77063ae5d389c2f75;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/FormSpecialPage.php b/includes/specialpage/FormSpecialPage.php index 42c59806b4..c28c456965 100644 --- a/includes/specialpage/FormSpecialPage.php +++ b/includes/specialpage/FormSpecialPage.php @@ -95,7 +95,7 @@ abstract class FormSpecialPage extends SpecialPage { $this->getContext(), $this->getMessagePrefix() ); - $form->setSubmitCallback( array( $this, 'onSubmit' ) ); + $form->setSubmitCallback( [ $this, 'onSubmit' ] ); if ( $this->getDisplayFormat() !== 'ooui' ) { // No legend and wrapper by default in OOUI forms, but can be set manually // from alterForm() @@ -109,7 +109,7 @@ abstract class FormSpecialPage extends SpecialPage { // Retain query parameters (uselang etc) $params = array_diff_key( - $this->getRequest()->getQueryValues(), array( 'title' => null ) ); + $this->getRequest()->getQueryValues(), [ 'title' => null ] ); $form->addHiddenField( 'redirectparams', wfArrayToCgi( $params ) ); $form->addPreText( $this->preText() ); @@ -117,7 +117,7 @@ abstract class FormSpecialPage extends SpecialPage { $this->alterForm( $form ); // Give hooks a chance to alter the form, adding extra fields or text etc - Hooks::run( 'SpecialPageBeforeFormDisplay', array( $this->getName(), &$form ) ); + Hooks::run( 'SpecialPageBeforeFormDisplay', [ $this->getName(), &$form ] ); return $form; } @@ -169,7 +169,6 @@ abstract class FormSpecialPage extends SpecialPage { * Failures here must throw subclasses of ErrorPageError. * @param User $user * @throws UserBlockedError - * @return bool True */ protected function checkExecutePermissions( User $user ) { $this->checkPermissions(); @@ -182,8 +181,6 @@ abstract class FormSpecialPage extends SpecialPage { if ( $this->requiresWrite() ) { $this->checkReadOnly(); } - - return true; } /**