From 3e2ce8c6f4b3c30bb79c921ee6991cd80c819287 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 8 Jun 2024 23:29:21 +0200 Subject: [PATCH] Use namespaced classes Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I51931c3aab6aa1e5bc77b3cc83b8014cf557ff75 --- includes/CategoryTree.php | 5 +++-- includes/Hooks.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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;