default mode.
* CACHE_ACCEL now only supports APC(u) or WinCache. XCache support was removed
as upstream is inactive and has no plans to move to PHP 7.
+* The old CategorizedRecentChanges feature, including its related configuration
+ option $wgAllowCategorizedRecentChanges, has been removed.
=== New features in 1.31 ===
* Wikimedia\Rdbms\IDatabase->select() and similar methods now support
* $a = $cf->run();
* print implode( ',' , $a );
* @endcode
+ *
+ * @deprecated since 1.31
*/
class CategoryFinder {
/** @var int[] The original article IDs passed to the seed function */
*/
$wgDisableAnonTalk = false;
-/**
- * Enable filtering of categories in Recentchanges
- */
-$wgAllowCategorizedRecentChanges = false;
-
/**
* Allow filtering by change tag in recentchanges, history, etc
* Has no effect if no tags are defined in valid_tag.
'showlinkedto' => false,
];
- if ( $config->get( 'AllowCategorizedRecentChanges' ) ) {
- $ret += [
- 'categories' => [
- ApiBase::PARAM_TYPE => 'string',
- ApiBase::PARAM_ISMULTI => true,
- ],
- 'categories_any' => false,
- ];
- }
-
return $ret;
}
"apihelp-feedrecentchanges-param-tagfilter": "Filter by tag.",
"apihelp-feedrecentchanges-param-target": "Show only changes on pages linked from this page.",
"apihelp-feedrecentchanges-param-showlinkedto": "Show changes on pages linked to the selected page instead.",
- "apihelp-feedrecentchanges-param-categories": "Show only changes on pages in all of these categories.",
- "apihelp-feedrecentchanges-param-categories_any": "Show only changes on pages in any of the categories instead.",
"apihelp-feedrecentchanges-example-simple": "Show recent changes.",
"apihelp-feedrecentchanges-example-30days": "Show recent changes for 30 days.",
"apihelp-feedrecentchanges-param-tagfilter": "{{doc-apihelp-param|feedrecentchanges|tagfilter}}",
"apihelp-feedrecentchanges-param-target": "{{doc-apihelp-param|feedrecentchanges|target}}",
"apihelp-feedrecentchanges-param-showlinkedto": "{{doc-apihelp-param|feedrecentchanges|showlinkedto}}",
- "apihelp-feedrecentchanges-param-categories": "{{doc-apihelp-param|feedrecentchanges|categories}}",
- "apihelp-feedrecentchanges-param-categories_any": "{{doc-apihelp-param|feedrecentchanges|categories_any}}",
"apihelp-feedrecentchanges-example-simple": "{{doc-apihelp-example|feedrecentchanges}}",
"apihelp-feedrecentchanges-example-30days": "{{doc-apihelp-example|feedrecentchanges}}",
"apihelp-feedwatchlist-summary": "{{doc-apihelp-summary|feedwatchlist}}",
}
}
- /**
- * 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
*
$join_conds
);
- // Build the final data
- if ( $this->getConfig()->get( 'AllowCategorizedRecentChanges' ) ) {
- $this->filterByCategories( $rows, $opts );
- }
-
return $rows;
}
*/
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 ) ) {
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 ) ) {
"unpatrolledletter": "!",
"number_of_watching_users_RCview": "[$1]",
"number_of_watching_users_pageview": "[$1 watching {{PLURAL:$1|user|users}}]",
- "rc_categories": "Limit to categories (separate with \"|\"):",
- "rc_categories_any": "Any of the chosen",
"rc-change-size": "$1",
"rc-change-size-new": "$1 {{PLURAL:$1|byte|bytes}} after change",
"newsectionsummary": "/* $1 */ new section",
"unpatrolledletter": "{{optional}}\n\nUsed in {{msg-mw|Recentchanges-label-legend}}, meaning \"unpatrolled\".",
"number_of_watching_users_RCview": "{{notranslate}}\nParameters:\n* $1 - number of users who are watching",
"number_of_watching_users_pageview": "Used if <code>$wgPageShowWatchingUsers</code> is true.\n* $1 - number of watching user(s)",
- "rc_categories": "A label of an input box. Appears on Special:RecentChanges if filtering recent changes by category is enabled (that is, $wgAllowCategorizedRecentChanges is set to true).",
- "rc_categories_any": "Appears ''after'' the input box the label of which is {{msg-mw|rc_categories}}, which appears on [[Special:RecentChanges]], if <code>$wgAllowCategorizedRecentChanges</code> is true. \"Chosen\" refers to categories.",
"rc-change-size": "{{optional}}\nDoes not work under $wgMiserMode ([[mwr:48986|r48986]]).\n\nParameters:\n* $1 - size of diff",
"rc-change-size-new": "Tooltip when hovering a change list diff size. Parameters:\n* $1 - the resulting new size (in bytes)",
"newsectionsummary": "Default summary when adding a new section to a page. Parameters:\n* $1 - section title",
private static $testGlobals = [
[
'MiserMode' => false,
- 'AllowCategorizedRecentChanges' => false,
],
[
'MiserMode' => true,
- 'AllowCategorizedRecentChanges' => true,
],
];