SiteStats::jobs fix when there is a single job
authorAntoine Musso <hashar@free.fr>
Mon, 29 May 2017 19:32:50 +0000 (21:32 +0200)
committerAntoine Musso <hashar@free.fr>
Mon, 29 May 2017 19:32:50 +0000 (21:32 +0200)
commite3f7dde410e0ac328190042af231e3fa13285e7d
tree78db194ec49c75c2ba8515df4b1a30920667e14b
parent25eb5296b9f5545506300d1cad8d06e293903d0e
SiteStats::jobs fix when there is a single job

wfSpecialStatistics() used a database to store the jobs. When estimating
the number of row in the `job` table, even when there is no row MySQL
would still do a single row read. Hence it erroneously returned 1.

That got fixed in 7cd0b2e0b (T12228) with a hack.

Nowadays, the functionality has been moved to SiteStats which is backed
up by a JobQueueGroup.  It now returns the exact number of jobs and the
hack is no more needed.  We failed to remove it when porting it to the
JobQueue system.

Change-Id: I6ef55b3dcff3e47a92e2eeeddcbae078654f815a
includes/SiteStats.php