X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentchanges.php;h=4abdebf8b51c00129a612667b0413b6f5c65b939;hp=7cc0dc6d10bfb866f0959630ade72f80e1f06375;hb=8624538de243da3779db5eb3362bedf78d2e2931;hpb=3b87d31562a09951a8983759bfd857ffef8f7b6f diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 7cc0dc6d10..4abdebf8b5 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -220,20 +220,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage { } } - /** - * Get a FormOptions object containing the default options - * - * @return FormOptions - */ - public function getDefaultOptions() { - $opts = parent::getDefaultOptions(); - - $opts->add( 'categories', '' ); - $opts->add( 'categories_any', false ); - - return $opts; - } - /** * Get all custom filters * @@ -359,11 +345,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $join_conds ); - // Build the final data - if ( $this->getConfig()->get( 'AllowCategorizedRecentChanges' ) ) { - $this->filterByCategories( $rows, $opts ); - } - return $rows; } @@ -667,16 +648,12 @@ class SpecialRecentChanges extends ChangesListSpecialPage { */ function getExtraOptions( $opts ) { $opts->consumeValues( [ - 'namespace', 'invert', 'associated', 'tagfilter', 'categories', 'categories_any' + 'namespace', 'invert', 'associated', 'tagfilter' ] ); $extraOpts = []; $extraOpts['namespace'] = $this->namespaceFilterForm( $opts ); - if ( $this->getConfig()->get( 'AllowCategorizedRecentChanges' ) ) { - $extraOpts['category'] = $this->categoryFilterForm( $opts ); - } - $tagFilter = ChangeTags::buildTagFilterSelector( $opts['tagfilter'], false, $this->getContext() ); if ( count( $tagFilter ) ) { @@ -740,29 +717,17 @@ class SpecialRecentChanges extends ChangesListSpecialPage { return [ $nsLabel, "$nsSelect $invert $associated" ]; } - /** - * Create an input to filter changes by categories - * - * @param FormOptions $opts - * @return array - */ - protected function categoryFilterForm( FormOptions $opts ) { - list( $label, $input ) = Xml::inputLabelSep( $this->msg( 'rc_categories' )->text(), - 'categories', 'mw-categories', false, $opts['categories'] ); - - $input .= ' ' . Xml::checkLabel( $this->msg( 'rc_categories_any' )->text(), - 'categories_any', 'mw-categories_any', $opts['categories_any'] ); - - return [ $label, $input ]; - } - /** * Filter $rows by categories set in $opts * + * @deprecated since 1.31 + * * @param ResultWrapper &$rows Database rows * @param FormOptions $opts */ function filterByCategories( &$rows, FormOptions $opts ) { + wfDeprecated( __METHOD__, '1.31' ); + $categories = array_map( 'trim', explode( '|', $opts['categories'] ) ); if ( !count( $categories ) ) {