HTMLForm: Add known MediaWiki version to wfDeprecated() call
[lhc/web/wiklou.git] / includes / htmlform / HTMLForm.php
index aeeb934..f5be83f 100644 (file)
@@ -222,15 +222,15 @@ class HTMLForm extends ContextSource {
        protected $mAction = false;
 
        /**
-        * Whether the HTML form can be collapsed
-        * @since 1.33
+        * Whether the form can be collapsed
+        * @since 1.34
         * @var bool
         */
        protected $mCollapsible = false;
 
        /**
-        * Whether the HTML form IS collapsed by default
-        * @since 1.33
+        * Whether the form is collapsed by default
+        * @since 1.34
         * @var bool
         */
        protected $mCollapsed = false;
@@ -1062,14 +1062,15 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * Make the form collapsible
-        * @since 1.33
-        * @param bool $collapsed whether it should be by default
-        * @return HTMLForm $this for chaining calls (since 1.20)
+        * Set whether the HTML form can be collapsed.
+        *
+        * @since 1.34
+        * @param bool $collapsedByDefault (optional) whether the form is collapsed by default
+        * @return HTMLForm $this for chaining calls
         */
-       public function setCollapsible( $collapsed = false ) {
+       public function setCollapsibleOptions( $collapsedByDefault = false ) {
                $this->mCollapsible = true;
-               $this->mCollapsed = $collapsed;
+               $this->mCollapsed = $collapsedByDefault;
                return $this;
        }
 
@@ -1286,7 +1287,7 @@ class HTMLForm extends ContextSource {
         * @return string
         */
        public function getErrors( $errors ) {
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.28' );
                return $this->getErrorsOrWarnings( $errors, 'error' );
        }
 
@@ -1372,21 +1373,6 @@ class HTMLForm extends ContextSource {
                return $this;
        }
 
-       /**
-        * Identify that the submit button in the form has a progressive action
-        * @since 1.25
-        * @deprecated since 1.32, No need to call. Submit button already
-        * has a progressive action form.
-        *
-        * @return HTMLForm $this for chaining calls (since 1.28)
-        */
-       public function setSubmitProgressive() {
-               wfDeprecated( __METHOD__, '1.32' );
-               $this->mSubmitFlags = [ 'progressive', 'primary' ];
-
-               return $this;
-       }
-
        /**
         * Set the text for the submit button to a message
         * @since 1.19