From 83795eaecec92ced9297a531fa174c29153347d4 Mon Sep 17 00:00:00 2001 From: "This, that and the other" Date: Tue, 17 Feb 2015 00:02:51 +1100 Subject: [PATCH] Make HTMLTagFilter disappear totally when $wgUseTagFilter = false Previously the label displayed but the input field didn't. Bug: T78432 Change-Id: Ia84ac611f76c98495a5b3f90c0ce01b6e1e404a3 --- includes/htmlform/HTMLTagFilter.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) 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 ''; } -- 2.20.1