From c89feebfd0f8308a0be23b254bb62830a235ea0d Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 14 Jan 2015 19:36:52 +0100 Subject: [PATCH] Fix "Bad value 1 for attribute autofocus" on special pages Xml::inputLabel does not work with boolean parameters, therefore change true to an empty string to avoid the '1' in html. This is done for Special:BookSources (from the bug), Special:ExpandTemplates, Special:Undelete and Special:Userrights Bug: T68134 Change-Id: I53ff5701840750f17a2ea9a1ec56cd88c00f3cf5 --- includes/specials/SpecialBooksources.php | 2 +- includes/specials/SpecialExpandTemplates.php | 2 +- includes/specials/SpecialUndelete.php | 4 ++-- includes/specials/SpecialUserrights.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 91a148dec0..7028fdcb84 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -135,7 +135,7 @@ class SpecialBookSources extends SpecialPage { 'isbn', 20, $this->isbn, - array( 'autofocus' => true, 'class' => 'mw-ui-input-inline' ) + array( 'autofocus' => '', 'class' => 'mw-ui-input-inline' ) ); $form .= ' ' . Html::submitButton( diff --git a/includes/specials/SpecialExpandTemplates.php b/includes/specials/SpecialExpandTemplates.php index 891ea01a23..b7582e6c62 100644 --- a/includes/specials/SpecialExpandTemplates.php +++ b/includes/specials/SpecialExpandTemplates.php @@ -154,7 +154,7 @@ class SpecialExpandTemplates extends SpecialPage { 'contexttitle', 60, $title, - array( 'autofocus' => true, 'class' => 'mw-ui-input-inline' ) + array( 'autofocus' => '', 'class' => 'mw-ui-input-inline' ) ) . '

'; $form .= '

' . Xml::label( $this->msg( 'expand_templates_input' )->text(), diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 205e2f416b..de2365e377 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -841,7 +841,7 @@ class SpecialUndelete extends SpecialPage { 'prefix', 20, $this->mSearchPrefix, - array( 'id' => 'prefix', 'autofocus' => true ) + array( 'id' => 'prefix', 'autofocus' => '' ) ) . ' ' . Xml::submitButton( $this->msg( 'undelete-search-submit' )->text() ) . Xml::closeElement( 'fieldset' ) . @@ -1314,7 +1314,7 @@ class SpecialUndelete extends SpecialPage { 'wpComment', 50, $this->mComment, - array( 'id' => 'wpComment', 'autofocus' => true ) + array( 'id' => 'wpComment', 'autofocus' => '' ) ) . " diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 7dd2b87149..785a844a63 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -441,7 +441,7 @@ class UserrightsPage extends SpecialPage { 30, str_replace( '_', ' ', $this->mTarget ), array( - 'autofocus' => true, + 'autofocus' => '', 'class' => 'mw-autocomplete-user', // used by mediawiki.userSuggest ) ) . ' ' . -- 2.20.1