jenkins-bot has submitted this change and it was merged.
Change subject: Only run onUserSaveSettings hook if not in update.php
......................................................................
Only run onUserSaveSettings hook if not in update.php
Depends on I57a47661f2069efb91340db8188be92d4efb23e9 in core.
Bug: 57335
Change-Id: I4cf977ee4e0dfd5c564334481e9ae2f6bca85b61
---
M Hooks.php
1 file changed, 8 insertions(+), 4 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Hooks.php b/Hooks.php
index 758a1c5..7227328 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -813,10 +813,14 @@
* @return bool true in all cases
*/
static function onUserSaveSettings( $user ) {
- // Reset the notification count since it may have changed due
to user
- // option changes. This covers both explicit changes in the
preferences
- // and changes made through the options API (since both call
this hook).
- MWEchoNotifUser::newFromUser( $user )->resetNotificationCount();
+ // Extensions like AbuseFilter might create an account, but
+ // the tables we need might not exist. Bug 57335
+ if ( !defined( 'MW_UPDATER' ) ) {
+ // Reset the notification count since it may have
changed due to user
+ // option changes. This covers both explicit changes in
the preferences
+ // and changes made through the options API (since both
call this hook).
+ MWEchoNotifUser::newFromUser( $user
)->resetNotificationCount();
+ }
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/96677
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4cf977ee4e0dfd5c564334481e9ae2f6bca85b61
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits