From: Mark Holmquist Date: Sat, 13 Oct 2012 23:33:50 +0000 (-0700) Subject: (bug 40889) Fix XHTML in Special:Upload form labels X-Git-Tag: 1.31.0-rc.0~22036^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=6f1d4db3e1e2bba4f204b44ee10cc8f87a2e1238;p=lhc%2Fweb%2Fwiklou.git (bug 40889) Fix XHTML in Special:Upload form labels We were using an improper method for adding labels to the form, namely using something other than the ID (and in fact, a nonexistent ID) in the 'for' attribute. This patch uses the ID of the parent element and should fix the issue. Note: Upstream bug in Firefox prevents testing this patch in that browser. Use Chromium, as the FF bug report says that it works there. See https://bugzilla.mozilla.org/show_bug.cgi?id=701353 for more. Change-Id: I19e06a3b94f67f364d129cbef4ecc232f108e82d --- diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index a061963d1e..e3a4c3abeb 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -1107,7 +1107,7 @@ class UploadSourceField extends HTMLTextField { * @return string */ function getLabelHtml( $cellAttributes = array() ) { - $id = "wpSourceType{$this->mParams['upload-type']}"; + $id = $this->mParams['id']; $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel ); if ( !empty( $this->mParams['radio'] ) ) {