The code that determines if a page is a legitimate article is:

<http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Article.php?view=markup>


=== code begin ===
    /**
     * Determine whether a page  would be suitable for being counted as an
     * article in the site_stats table based on the title & its content
     *
     * @param $text String: text to analyze
     * @return bool
     */
    function isCountable( $text ) {
        global $wgUseCommaCount;

        $token = $wgUseCommaCount ? ',' : '[[';
        return
            $this->mTitle->isContentPage()
            && !$this->isRedirect( $text )
            && in_string( $token, $text );
    }
=== code end ===

So not only links make a page an article, but also a category, an
interlanguage link or an interwiki link. Also a <nowiki>[[</nowiki>.
It only checks if the string "[[" is found in the text. Only the text
directly in the page. Templates are not incuded here (or it seems to
me).


2008/1/16, Chris Stafford wrote:
> for all those interested, i found the answer to ryan's original question.
> i spent some time digging in the source and talking to some people
> (*cough*Tim*cough*Starling) in #mediawiki on freenode last night
>
> short answer: it doesnt, its just some jargon text written in the days of
> old.
>
> long answer: the system only checks for "page" (anything) vs "article" (good
> stuff)
>
> TimStarling>uberfuzzy: the answer to your question is: a countable article
> is one with at least one internal link, is not a redirect, and is in a
> content namespace (usually the main namespace)
>
> in terms of MediaWiki:Sitestatstext  pages are in $1, articles in $2. any
> other text descriptions there defining what either is doesnt really mean
> much, its there to help quickly explain the difference to people who dont
> really care about the code behind it.
>
> -chris "uberfuzzy" stafford
>
>
>
> _______________________________________________
> Wikia-l mailing list
> [email protected]
> http://lists.wikia.com/mailman/listinfo/wikia-l
>
>
_______________________________________________
Wikia-l mailing list
[email protected]
http://lists.wikia.com/mailman/listinfo/wikia-l

Reply via email to