41 'duplicate-args-category',
42 'expensive-parserfunction-category',
43 'post-expand-template-argument-category',
44 'post-expand-template-inclusion-category',
45 'hidden-category-category',
46 'broken-file-category',
47 'node-count-exceeded-category',
48 'expansion-depth-exceeded-category',
49 'restricted-displaytitle-ignored',
50 'deprecated-self-close-category',
51 'template-loop-category',
66 $categories = array_merge(
67 self::$coreTrackingCategories,
69 $this->config->get(
'TrackingCategories' )
73 $enableMagicLinks = $this->config->get(
'EnableMagicLinks' );
74 if ( $enableMagicLinks[
'ISBN'] ) {
75 $categories[] =
'magiclink-tracking-isbn';
77 if ( $enableMagicLinks[
'RFC'] ) {
78 $categories[] =
'magiclink-tracking-rfc';
80 if ( $enableMagicLinks[
'PMID'] ) {
81 $categories[] =
'magiclink-tracking-pmid';
84 $trackingCategories = [];
85 $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
86 foreach ( $categories as $catMsg ) {
92 $msgObj =
wfMessage( $catMsg )->inContentLanguage();
95 if ( !$catMsgTitle ) {
101 if ( strpos( $msgObj->plain(),
'{{' ) !==
false ) {
102 $ns = $nsInfo->getValidNamespaces();
103 foreach ( $ns as $namesp ) {
108 $catName = $msgObj->title( $tempTitle )->text();
109 # Allow tracking categories to be disabled by setting them to "-"
110 if ( $catName !==
'-' ) {
113 $allCats[] = $catTitle;
118 $catName = $msgObj->text();
119 # Allow tracking categories to be disabled by setting them to "-"
120 if ( $catName !==
'-' ) {
123 $allCats[] = $catTitle;
127 $trackingCategories[$catMsg] = [
129 'msg' => $catMsgTitle,
133 return $trackingCategories;