From: This, that and the other Date: Mon, 16 Feb 2015 13:02:51 +0000 (+1100) Subject: Make HTMLTagFilter disappear totally when $wgUseTagFilter = false X-Git-Tag: 1.31.0-rc.0~12401^2 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=83795eaecec92ced9297a531fa174c29153347d4;p=lhc%2Fweb%2Fwiklou.git Make HTMLTagFilter disappear totally when $wgUseTagFilter = false Previously the label displayed but the input field didn't. Bug: T78432 Change-Id: Ia84ac611f76c98495a5b3f90c0ce01b6e1e404a3 --- diff --git a/includes/htmlform/HTMLTagFilter.php b/includes/htmlform/HTMLTagFilter.php index eac9423998..8075de5a3b 100644 --- a/includes/htmlform/HTMLTagFilter.php +++ b/includes/htmlform/HTMLTagFilter.php @@ -1,14 +1,30 @@ tagFilter = ChangeTags::buildTagFilterSelector( $value ); + if ( $this->tagFilter ) { + return parent::getTableRow( $value ); + } + return ''; + } + + function getDiv( $value ) { + $this->tagFilter = ChangeTags::buildTagFilterSelector( $value ); + if ( $this->tagFilter ) { + return parent::getDiv( $value ); + } + return ''; + } + function getInputHTML( $value ) { - $tagFilter = ChangeTags::buildTagFilterSelector( $value ); - if ( $tagFilter ) { - list( $tagFilterLabel, $tagFilterSelector ) = $tagFilter; + if ( $this->tagFilter ) { // we only need the select field, HTMLForm should handle the label - return $tagFilterSelector; + return $this->tagFilter[1]; } return ''; }