Add a Skins category to Special:Version.
[lhc/web/wiklou.git] / includes / HTMLForm.php
index 1192669..fff1b40 100644 (file)
@@ -209,7 +209,9 @@ class HTMLForm {
                        $result = $this->trySubmit();
                }
 
-               if ( $result === true ) {
+               if ( $result === true ||
+                       ( $result instanceof Status && $result->isGood() ) )
+               {
                        return $result;
                }
 
@@ -460,7 +462,10 @@ class HTMLForm {
         * @return String
         */
        function getErrors( $errors ) {
-               if ( is_array( $errors ) ) {
+               if ( $errors instanceof Status ) {
+                       global $wgOut;
+                       $errorstr = $wgOut->parse( $errors->getWikiText() );
+               } elseif ( is_array( $errors ) ) {
                        $errorstr = $this->formatErrors( $errors );
                } else {
                        $errorstr = $errors;
@@ -908,7 +913,7 @@ abstract class HTMLFormField {
 
                global $wgUser;
 
-               return $wgUser->getSkin()->tooltipAndAccessKeyAttribs();
+               return $wgUser->getSkin()->tooltipAndAccessKeyAttribs( $this->mParams['tooltip'] );
        }
 
        /**