X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentchanges.php;h=d6d4c2723ff1d554cdc2289505297d1c609672dc;hb=d537b51bfbf7f9358e82ee6c957c6e78f9316292;hp=7cc0dc6d10bfb866f0959630ade72f80e1f06375;hpb=3b87d31562a09951a8983759bfd857ffef8f7b6f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 7cc0dc6d10..d6d4c2723f 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 ) ) { @@ -709,7 +686,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage { */ public function checkLastModified() { $dbr = $this->getDB(); - $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__ ); + $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', '', __METHOD__ ); return $lastmod; } @@ -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 ) ) {