aboutsummaryrefslogtreecommitdiffstats
path: root/includes/CategoryViewer.php
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2014-06-24 18:07:55 -0700
committerAaron Schulz <aschulz@wikimedia.org>2014-06-24 18:07:55 -0700
commite79535a582ea9ba22e6fb5e1d5ab13dc7dae38e4 (patch)
tree854405b515aecb263a429969a1cca0c8a761822a /includes/CategoryViewer.php
parentbaa31838990244d0d344f90010498dde7cb08744 (diff)
downloadmediawikicore-e79535a582ea9ba22e6fb5e1d5ab13dc7dae38e4.tar.gz
mediawikicore-e79535a582ea9ba22e6fb5e1d5ab13dc7dae38e4.zip
Avoid begin/commit in Category::getCountMessage()
Change-Id: I64e4a859a9adf2930265e282f59816c82e1c3070
Diffstat (limited to 'includes/CategoryViewer.php')
-rw-r--r--includes/CategoryViewer.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 49818e6a12e1..cd9eaa9c103b 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -707,7 +707,10 @@ class CategoryViewer extends ContextSource {
// to refresh the incorrect category table entry -- which should be
// quick due to the small number of entries.
$totalcnt = $rescnt;
- $this->cat->refreshCounts();
+ $category = $this->cat;
+ wfGetDB( DB_MASTER )->onTransactionIdle( function() use ( $category ) {
+ $category->refreshCounts();
+ } );
} else {
// Case 3: hopeless. Don't give a total count at all.
// Messages: category-subcat-count-limited, category-article-count-limited,