Merge "lockmanager: disable internal QuorumLockManager methods that should never...
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLInfoField.php
index 1376d0c..ab59ff0 100644 (file)
@@ -22,7 +22,7 @@ class HTMLInfoField extends HTMLFormField {
        public function getDefault() {
                $default = parent::getDefault();
                if ( $default instanceof Closure ) {
-                       $default = call_user_func( $default, $this->mParams );
+                       $default = $default( $this->mParams );
                }
                return $default;
        }
@@ -75,6 +75,23 @@ class HTMLInfoField extends HTMLFormField {
                return parent::getRaw( $value );
        }
 
+       /**
+        * @param mixed $value If not FieldLayout or subclass has been deprecated.
+        * @return OOUI\FieldLayout
+        * @since 1.32
+        */
+       public function getOOUI( $value ) {
+               if ( !empty( $this->mParams['rawrow'] ) ) {
+                       if ( !( $value instanceof OOUI\FieldLayout ) ) {
+                               wfDeprecated( __METHOD__ . ": 'default' parameter as a string when using" .
+                                       "'rawrow' (must be a FieldLayout or subclass)", '1.32' );
+                       }
+                       return $value;
+               }
+
+               return parent::getOOUI( $value );
+       }
+
        protected function needsLabel() {
                return false;
        }