From: cenarium Date: Fri, 23 Sep 2016 21:28:07 +0000 (+0200) Subject: Remove full form of ChangeTags::buildTagFilterSelector X-Git-Tag: 1.31.0-rc.0~5301^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=a78a3f28a21f6e8e7886e0cf1c62b423503b5d28;p=lhc%2Fweb%2Fwiklou.git Remove full form of ChangeTags::buildTagFilterSelector This removes the full form option of ChangeTags::buildTagFilterSelector since it is completely unused, either in core or extensions. OOUI for tag selectors aren't implemented yet so the change in signature shouldn't affect anything. Change-Id: Ie97b77244b6a9596b53b562b71009686932cf97e --- diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 6455a3a980..15911bdc62 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -656,21 +656,15 @@ class ChangeTags { * Build a text box to select a change tag * * @param string $selected Tag to select by default - * @param bool $fullForm Affects return value, see below - * @param Title $title Title object to send the form to. Used only if $fullForm is true. * @param bool $ooui Use an OOUI TextInputWidget as selector instead of a non-OOUI input field * You need to call OutputPage::enableOOUI() yourself. - * @return string|array - * - if $fullForm is false: an array of (label, selector). - * - if $fullForm is true: HTML of entire form built around the selector. + * @return array an array of (label, selector) */ - public static function buildTagFilterSelector( $selected = '', - $fullForm = false, Title $title = null, $ooui = false - ) { + public static function buildTagFilterSelector( $selected = '', $ooui = false ) { global $wgUseTagFilter; if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) { - return $fullForm ? '' : []; + return []; } $data = [ @@ -697,24 +691,7 @@ class ChangeTags { ); } - if ( !$fullForm ) { - return $data; - } - - $html = implode( ' ', $data ); - $html .= "\n" . - Xml::element( - 'input', - [ 'type' => 'submit', 'value' => wfMessage( 'tag-filter-submit' )->text() ] - ); - $html .= "\n" . Html::hidden( 'title', $title->getPrefixedText() ); - $html = Xml::tags( - 'form', - [ 'action' => $title->getLocalURL(), 'class' => 'mw-tagfilter-form', 'method' => 'get' ], - $html - ); - - return $html; + return $data; } /**