X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2Ffields%2FHTMLRestrictionsField.php;h=dbf2c8f6444c8a25715317aeb16ec4c6159761d7;hb=2c8f7978df47f338ee6e245e3efba6175ba425e9;hp=8dc16bff802098b92146ec61cc6ec9cdf6dbbb13;hpb=75d8b6c6cd2b70d98242e1246678c12e973a5dfa;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/fields/HTMLRestrictionsField.php b/includes/htmlform/fields/HTMLRestrictionsField.php index 8dc16bff80..dbf2c8f644 100644 --- a/includes/htmlform/fields/HTMLRestrictionsField.php +++ b/includes/htmlform/fields/HTMLRestrictionsField.php @@ -32,7 +32,7 @@ class HTMLRestrictionsField extends HTMLTextAreaField { * @param WebRequest $request * @return string|MWRestrictions Restrictions object or original string if invalid */ - function loadDataFromRequest( $request ) { + public function loadDataFromRequest( $request ) { if ( !$request->getCheck( $this->mName ) ) { return $this->getDefault(); } @@ -61,7 +61,7 @@ class HTMLRestrictionsField extends HTMLTextAreaField { * @param string|MWRestrictions $value The value the field was submitted with * @param array $alldata The data collected from the form * - * @return bool|string True on success, or String error to display, or + * @return bool|string|Message True on success, or String/Message error to display, or * false to fail validation without displaying an error. */ public function validate( $value, $alldata ) { @@ -73,7 +73,7 @@ class HTMLRestrictionsField extends HTMLTextAreaField { isset( $this->mParams['required'] ) && $this->mParams['required'] !== false && $value instanceof MWRestrictions && !$value->toArray()['IPAddresses'] ) { - return $this->msg( 'htmlform-required' )->parse(); + return $this->msg( 'htmlform-required' ); } if ( is_string( $value ) ) { @@ -87,7 +87,7 @@ class HTMLRestrictionsField extends HTMLTextAreaField { if ( $status->isOK() ) { $status->fatal( 'unknown-error' ); } - return $status->getMessage()->parse(); + return $status->getMessage(); } if ( isset( $this->mValidationCallback ) ) {