Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/239764

Change subject: Defer the User::saveSettings() call in TopicListBlock
......................................................................

Defer the User::saveSettings() call in TopicListBlock

Change-Id: I40c590346c2634f2c35271e813e68d4a6ae70836
---
M includes/Block/TopicList.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/64/239764/1

diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index cbbcebd..e4d4569 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -424,7 +424,10 @@
                        && $user->getOption( 'flow-topiclist-sortby' ) != 
$findOptions['sortby']
                ) {
                        $user->setOption( 'flow-topiclist-sortby', 
$findOptions['sortby'] );
-                       $user->saveSettings();
+                       // Save the user preferences post-send
+                       \DeferredUpdates::addCallableUpdate( function() use ( 
$user ) {
+                               $user->saveSettings();
+                       } );
                }
 
                return $findOptions;

-- 
To view, visit https://gerrit.wikimedia.org/r/239764
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40c590346c2634f2c35271e813e68d4a6ae70836
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to