Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2268,15 +2268,10 @@ |
2269 | 2269 | // Unconditional performance requirement |
2270 | 2270 | if( $wgMiserMode ) |
2271 | 2271 | return true; |
2272 | | - // Make a rough estimate |
2273 | | - $dbr = wfGetDB( DB_SLAVE ); |
2274 | | - $stats = $dbr->selectRow( |
2275 | | - 'site_stats', |
2276 | | - array( 'ss_total_pages AS pages', 'ss_total_edits AS edits', 'ss_users AS users' ), |
2277 | | - array(), |
2278 | | - __METHOD__ |
2279 | | - ); |
2280 | | - return $stats->pages > 100000 && $stats->edits > 1000000 && $stats->users > 10000; |
| 2272 | + // Rough estimate based on statistics |
| 2273 | + return SiteStats::pages() > 100000 |
| 2274 | + && SiteStats::edits() > 1000000 |
| 2275 | + && SiteStats::users() > 10000; |
2281 | 2276 | } |
2282 | 2277 | |
2283 | 2278 | /** |