9use MediaWiki\Cache\LinkBatchFactory;
10use MediaWiki\Languages\LanguageConverterFactory;
28 private $exceptionList =
null;
33 LinkBatchFactory $linkBatchFactory,
34 LanguageConverterFactory $languageConverterFactory
40 $languageConverterFactory
42 $this->mName =
'Uncategorizedcategories';
52 private function getExceptionList() {
53 if ( $this->exceptionList ===
null ) {
54 $this->exceptionList = [];
55 $exList = $this->
msg(
'uncategorized-categories-exceptionlist' )
56 ->inContentLanguage()->plain();
57 $proposedTitles = explode(
"\n", $exList );
58 foreach ( $proposedTitles as $titleStr ) {
59 if ( !str_starts_with( $titleStr,
'*' ) ) {
62 $titleStr = preg_replace(
"/^\\*\\s*/",
'', $titleStr );
63 $title = Title::newFromText( $titleStr,
NS_CATEGORY );
64 if ( $title && $title->getNamespace() !==
NS_CATEGORY ) {
65 $title = Title::makeTitleSafe(
NS_CATEGORY, $titleStr );
68 $this->exceptionList[] = $title->getDBkey();
72 return $this->exceptionList;
77 $query = parent::getQueryInfo();
78 $exceptionList = $this->getExceptionList();
79 if ( $exceptionList ) {
81 $query[
'conds'][] = $dbr->expr(
'page_title',
'!=', $exceptionList );
95 $text = $title->getText();
105class_alias( SpecialUncategorizedCategories::class,
'SpecialUncategorizedCategories' );
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
List of pages without any category.