Use Title::isContentPage() instead of a manual check
authorRob Church <robchurch@users.mediawiki.org>
Mon, 8 Jan 2007 16:31:52 +0000 (16:31 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Mon, 8 Jan 2007 16:31:52 +0000 (16:31 +0000)
includes/Article.php

index 6b4f527..f36a674 100644 (file)
@@ -471,12 +471,12 @@ class Article {
         * @return bool
         */
        function isCountable( $text ) {
-               global $wgUseCommaCount, $wgContentNamespaces;
+               global $wgUseCommaCount;
 
                $token = $wgUseCommaCount ? ',' : '[[';
                return
-                       array_search( $this->mTitle->getNamespace(), $wgContentNamespaces ) !== false
-                       && ! $this->isRedirect( $text )
+                       $this->mTitle->isContentPage()
+                       && !$this->isRedirect( $text )
                        && in_string( $token, $text );
        }