Move category refreshes to a deferred update
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 30 Dec 2015 04:22:54 +0000 (20:22 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 30 Dec 2015 04:22:54 +0000 (20:22 -0800)
Bug: T92357
Change-Id: Ic0d53c0ca01195cc5dd1f5a28602b3d4403e9fa5

includes/CategoryViewer.php

index e2c31a6..2ceeed2 100644 (file)
@@ -713,7 +713,7 @@ class CategoryViewer extends ContextSource {
                        // quick due to the small number of entries.
                        $totalcnt = $rescnt;
                        $category = $this->cat;
-                       wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $category ) {
+                       DeferredUpdates::addCallableUpdate( function () use ( $category ) {
                                $category->refreshCounts();
                        } );
                } else {