mediawiki-extensions-Echo/maintenance
Roan Kattouw 0807c3c5ad NotifUser: Refactor getNotificationCount() and friends, add caching for global counts
Previously, getNotificationCount() only looked at local notifications,
and foreign notifications were added in separately by getMessageCount()
and getAlertCount(). This didn't make any sense and resulted in
counter-intuitive things like I4d49b543.

Instead, add a $global flag to getNotificationCount(). If $global=false,
the local count is returned as before, but if $global=true, the
global count (=local+foreign) is returned. If $global is omitted,
the user's cross-wiki notification preference determines which is returned.

Update getLastUnreadNotificationCount() in the same way, since it had
the same issues.

Also add caching for global counts and timestamps, using a global
memc key.

Bug: T133623
Change-Id: If78bfc710acd91a075771b565cc99f4c302a104d
2016-05-02 16:16:57 -07:00
..
backfillUnreadWikis.php NotifUser: Refactor getNotificationCount() and friends, add caching for global counts 2016-05-02 16:16:57 -07:00
generateSampleNotifications.php Support generating sample notifications by types 2016-03-02 15:04:56 -05:00
processEchoEmailBatch.php build: Enable phpcs rule 'MediaWiki.Usage.DirUsage.FunctionFound' and make pass 2015-10-29 12:57:40 +01:00
removeInvalidNotification.php Use Maintenance DB transaction methods 2015-12-31 15:12:05 -08:00
removeInvalidTargetPage.php build: Enable phpcs rule 'MediaWiki.VariableAnalysis.UnusedGlobalVariables' and make pass 2015-10-29 17:25:51 +00:00
testDiscussionParser.php build: Enable phpcs rule 'MediaWiki.Usage.DirUsage.FunctionFound' and make pass 2015-10-29 12:57:40 +01:00
updateEchoSchemaForSuppression.php Replace EchoBatchRowUpdate with BatchRowUpdate 2015-12-16 16:36:59 +00:00