diff --git a/includes/CategoryTree.php b/includes/CategoryTree.php index a73405c0..fe85a47e 100644 --- a/includes/CategoryTree.php +++ b/includes/CategoryTree.php @@ -29,6 +29,7 @@ use MediaWiki\Category\Category; use MediaWiki\Config\Config; use MediaWiki\Context\IContextSource; use MediaWiki\Context\RequestContext; +use MediaWiki\Extension\Translate\PageTranslation\TranslatablePage; use MediaWiki\Html\Html; use MediaWiki\Linker\LinkRenderer; use MediaWiki\MediaWikiServices; @@ -235,9 +236,9 @@ class CategoryTree { if ( $suppressTranslations ) { $title = Title::newFromRow( $row ); $baseTitle = $title->getBaseTitle(); - $page = \TranslatablePage::isTranslationPage( $title ); + $page = TranslatablePage::isTranslationPage( $title ); - if ( ( $page instanceof \TranslatablePage ) && $baseTitle->exists() ) { + if ( ( $page instanceof TranslatablePage ) && $baseTitle->exists() ) { // T229265: Render only the default pages created and ignore their // translations. continue; diff --git a/includes/Hooks.php b/includes/Hooks.php index 34725f6c..2f26b745 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -28,7 +28,6 @@ use MediaWiki\Config\Config; use MediaWiki\Context\RequestContext; use MediaWiki\Hook\CategoryViewer__doCategoryQueryHook; use MediaWiki\Hook\CategoryViewer__generateLinkHook; -use MediaWiki\Hook\OutputPageMakeCategoryLinksHook; use MediaWiki\Hook\ParserFirstCallInitHook; use MediaWiki\Hook\SkinBuildSidebarHook; use MediaWiki\Hook\SpecialTrackingCategories__generateCatLinkHook; @@ -36,6 +35,7 @@ use MediaWiki\Hook\SpecialTrackingCategories__preprocessHook; use MediaWiki\Html\Html; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkTarget; +use MediaWiki\Output\Hook\OutputPageMakeCategoryLinksHook; use MediaWiki\Output\OutputPage; use MediaWiki\Parser\Parser; use MediaWiki\Parser\Sanitizer;