X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialTrackingCategories.php;h=d219c99d0361b0921ac51de338c96f0c9131fc74;hp=7684c0511729d5fd7914cbf561afb7e917bdeba0;hb=b51076a84446d157bed511246450e70d26e0f945;hpb=81c698cc8caf94e03d9457b67e1b4e94d47c7f4f diff --git a/includes/specials/SpecialTrackingCategories.php b/includes/specials/SpecialTrackingCategories.php index 7684c05117..d219c99d03 100644 --- a/includes/specials/SpecialTrackingCategories.php +++ b/includes/specials/SpecialTrackingCategories.php @@ -36,6 +36,24 @@ class SpecialTrackingCategories extends SpecialPage { parent::__construct( 'TrackingCategories' ); } + /** + * Tracking categories that exist in core + * + * @var array + */ + private static $coreTrackingCategories = array( + 'index-category', + 'noindex-category', + 'duplicate-args-category', + 'expensive-parserfunction-category', + 'post-expand-template-argument-category', + 'post-expand-template-inclusion-category', + 'hidden-category-category', + 'broken-file-category', + 'node-count-exceeded-category', + 'expansion-depth-exceeded-category', + ); + function execute( $par ) { $this->setHeaders(); $this->outputHeader(); @@ -120,8 +138,13 @@ class SpecialTrackingCategories extends SpecialPage { * @return array Array( 'msg' => Title, 'cats' => Title[] ) */ private function prepareTrackingCategoriesData() { + $categories = array_merge( + self::$coreTrackingCategories, + ExtensionRegistry::getInstance()->getAttribute( 'TrackingCategories' ), + $this->getConfig()->get( 'TrackingCategories' ) // deprecated + ); $trackingCategories = array(); - foreach ( $this->getConfig()->get( 'TrackingCategories' ) as $catMsg ) { + foreach ( $categories as $catMsg ) { /* * Check if the tracking category varies by namespace * Otherwise only pages in the current namespace will be displayed