Jump to content

User:Iritscen/TestSpace: Difference between revisions

m
→‎Magic words: MW also supposedly won't count an article without a comma, but it actually just looks at whether (length > 0) because "if the page is empty, it can't contain a comma"; shoot me now
(→‎Page count project: actually, NUMBEROFARTICLES is not far off)
m (→‎Magic words: MW also supposedly won't count an article without a comma, but it actually just looks at whether (length > 0) because "if the page is empty, it can't contain a comma"; shoot me now)
Line 43: Line 43:
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}


MW code says: In our current MW version, 1.16.5, the code simply counts all pages which are in content namespaces (as listed in $wgContentNamespaces) and are not redirects and are not empty. In the current version of MW, the function then gets a distinct count of the entries in the pagelinks table, "pl_from" field, that match those page ids. In other words, it filters out pages that do not link to other pages (the reasoning presumably being that "those aren't real wiki pages" if they're not connecting to anything else).
MW code says: In our current MW version, 1.16.5, the code simply counts all pages which are in content namespaces (as listed in $wgContentNamespaces) and are not redirects and are not empty. From MW 1.18 on, the function now gets a distinct count of the entries in the pagelinks table, "pl_from" field, that match those page ids. In other words, it filters out pages that do not link to other pages (the reasoning presumably being that "those aren't real wiki pages" if they're not connecting to anything else).


Iritscen says: One would expect that this number would therefore agree with PAGESINNS when one adds in the pages listed on [[Special:DeadendPages]]; however, there were 107 dead-end pages as of 4/22/12. Adding these back in still leads to a lower result than using PAGESINNS less redirects (see bottom), so I consider NUMBEROFARTICLES too suspect to use.
Iritscen says: One would expect that in the current software, this number would therefore agree with the sum of the results from PAGESINNS for each namespace if you account for redirects, but it's off by 30 as of 4/22/12 (see bottom section). Things will become more complicated when we eventually upgrade the wiki, as dead-end pages will also be excluded from this count, which is not desirable. Fortunately, we can get a list of these pages on [[Special:DeadendPages]]. But since NUMBEROFARTICLES should agree currently with PAGESINNS less redirects, and it doesn't, I consider NUMBEROFARTICLES too unreliable to use.


'''PAGESINNS''', AKA PAGESINNAMESPACE: These counts agree with the number of pages displayed for each namespace on the [[Special:AllPages]] page, which provides some much-needed verifiability. However, since Allpages counts redirect pages, that means that PAGESINNS does too. Therefore, we can't use a straight sum of PAGESINNS results as our page count.
'''PAGESINNS''', AKA PAGESINNAMESPACE: These counts agree with the number of pages displayed for each namespace on the [[Special:AllPages]] page, which provides some much-needed verifiability. However, since Allpages counts redirect pages, that means that PAGESINNS does too. Therefore, we can't use a straight sum of PAGESINNS results as our page count. See final section for the adjusted number.


PAGESINNS breakdown:
PAGESINNS breakdown: