Refresh category table counts sometimes for small categories
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 5 Sep 2008 16:31:34 +0000 (16:31 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 5 Sep 2008 16:31:34 +0000 (16:31 +0000)
commit027771c2eadb5b3b548ffad97fc350842ffdde42
treeeff91935aa16c8e9da1f02dadb68c40bedd6c482
parent9923aeb744f0bf7ce0dfe812c9226f8bf3836f53
Refresh category table counts sometimes for small categories

When someone views a category page, if the number of retrieved pages is the whole category (no from= or until=, 200 or less retrieved), and that number doesn't match the number in the category table, we already detect that this is wrong and ignore the bogus category table number.  Now the software also refreshes the bogus category counts in the database in this case, which should be pretty much instantaneous since it has less than 200 entries.

This adds no overhead for categories that have correct counts, and fixes the most visible case when category counts are wrong: small categories, when you can easily count the pages.
includes/CategoryPage.php