Merge "Add more test cases to OldChangesListTest"
[lhc/web/wiklou.git] / includes / htmlform / HTMLButtonField.php
index b0b08a6..5a1006a 100644 (file)
@@ -15,8 +15,9 @@ class HTMLButtonField extends HTMLFormField {
 
        public function __construct( $info ) {
                $info['nodata'] = true;
-               if ( isset( $info['flags'] ) )
+               if ( isset( $info['flags'] ) ) {
                        $this->mFlags = $info['flags'];
+               }
                parent::__construct( $info );
        }
 
@@ -28,7 +29,7 @@ class HTMLButtonField extends HTMLFormField {
                ) {
                        $prefix = 'mw-ui-';
                        // add mw-ui-button separately, so the descriptor doesn't need to set it
-                       $flags .= $prefix.'button';
+                       $flags .= ' ' . $prefix . 'button';
                }
                foreach ( $this->mFlags as $flag ) {
                        $flags .= ' ' . $prefix . $flag;