Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Use ParserOutput::getCategoryNames() instead of ::getCategories() #426

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license-name": "AGPL-3.0-or-later",
"type": "specialpage",
"requires": {
"MediaWiki": ">= 1.36.0",
"MediaWiki": ">= 1.38.0",
"extensions": {
"CategoryTree": "*"
}
Expand Down
2 changes: 1 addition & 1 deletion includes/Hooks/RecursiveCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function onCategoryAfterPageAdded( $category, $wikiPage ) {
* @inheritDoc
*/
public function onContentAlterParserOutput( $content, $title, $parserOutput ) {
$cats = array_keys( $parserOutput->getCategories() );
$cats = $parserOutput->getCategoryNames();
if ( !$cats ) {
return;
}
Expand Down