Merge "(bug 40384) Move width/height from button to img"
authorNikerabbit <niklas.laxstrom@gmail.com>
Sun, 30 Sep 2012 16:11:08 +0000 (16:11 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 30 Sep 2012 16:11:08 +0000 (16:11 +0000)
1  2 
includes/SkinTemplate.php

@@@ -529,8 -529,6 +529,8 @@@ class SkinTemplate extends Skin 
         * @return array
         */
        protected function buildPersonalUrls() {
 +              global $wgSecureLogin;
 +
                $title = $this->getTitle();
                $request = $this->getRequest();
                $pageurl = $title->getLocalURL();
                                $a['returntoquery'] = $query;
                        }
                }
 +
 +              if ( $wgSecureLogin && $request->detectProtocol() == 'https' ) {
 +                      $a['wpStickHTTPS'] = true;
 +              }
 +
                $returnto = wfArrayToCGI( $a );
                if( $this->loggedin ) {
                        $personal_urls['userpage'] = array(
@@@ -1790,11 -1783,15 +1790,15 @@@ abstract class BaseTemplate extends Qui
                                );
                                unset( $buttonAttrs['src'] );
                                unset( $buttonAttrs['alt'] );
+                               unset( $buttonAttrs['width'] );
+                               unset( $buttonAttrs['height'] );
                                $imgAttrs = array(
                                        'src' => $attrs['src'],
                                        'alt' => isset( $attrs['alt'] )
                                                ? $attrs['alt']
                                                : $this->translator->translate( 'searchbutton' ),
+                                       'width' => isset( $attrs['width'] ) ? $attrs['width'] : null,
+                                       'height' => isset( $attrs['height'] ) ? $attrs['height'] : null,
                                );
                                return Html::rawElement( 'button', $buttonAttrs, Html::element( 'img', $imgAttrs ) );
                        default: