Commit graph

10 commits

Author SHA1 Message Date
kaldari 5a4704e357 Only create notifications that are wanted by the recipients
Also moving getUserEnabledEvents from EchoBackend to
NotificationController since it has nothing to do with the backend.

Bug: 47664
Change-Id: I4f9682b861d9f035ae45f206c37ec0ae1c09ab64
2013-04-28 11:09:15 -07:00
bsitu e9d042283c Remove static object cache to avoid cross wiki related issue
Some script like job runners are running against multiple wikis, caching the object would make later wikis use the incorrect object, it's global variable anyway, there is no need to cache it

Change-Id: I427a5cefbd607aaf897dfa07087e381faffea495
2013-04-18 20:50:48 -07:00
kaldari 9448c6cab0 Add 'Mark all as read' button to overlay
Button is only shown if there are more unread notifications than
fit in the overlay.

To avoid performance issues, this version only works for cases where
the number of unread notifications is less than the maximum count
(99 currently). Otherwise the button to mark all as read isn't
displayed (it's also limited on the server-side for good measure).

Bug: 47092
Change-Id: Ifcb0a436e2b31062741c441cca239d35ddefa0e1
2013-04-18 00:29:36 -07:00
bsitu d44ed993a2 Add email bundling function to Echo notification
* This patch needs intensive testing on Redis delayed job queue
* This patch is -2 mainly for redis/phpredis are not ready on test/test2/mediawiki

To test this locally, you need to:
* set up Redis and phpredis locally
* add the following to localSettings.php
    $wgJobTypeConf['MWEchoNotificationEmailBundleJob'] = array(
        'class'       => 'JobQueueRedis',
        'redisServer' => '127.0.0.1',
        'redisConfig' => array( 'connectTimeout' => 1 ),
        'claimTTL'    => 3600,
        'checkDelay'  => true
    );
* set $wgMainCacheType to CACHE_DB or memcache
* set $wgEchoBundleEmailInterval to smaller number for testing purpose, 0 to disable email bundling

Change-Id: I9313e7f6ed3e13478cec294b5b8408fe8e941faf
2013-04-11 11:25:14 -07:00
bsitu 6a3624b0e4 Add web bundling function to Echo notification
* add web bundling feature
* unify event_timestamp with notification_timestamp
* remove echo_subscription
* update article_link to page_link notification with new logic
* remove duplicated function from MWDbEchoEmailBatch since it's defined in parent class

Change-Id: I2fa91c44edb020209b468fe13f894d9db3732e69
2013-04-04 10:53:46 -07:00
Kaldari c253342de4 Making defaultUserOptions based on category to match preferences
Also making getUserEnabledEvents check the categories

Change-Id: I561ccbb82605a6c2122330b791f3790d9dbe9078
2013-03-07 10:56:13 -08:00
Kaldari 8357f4bd75 Implementing new prefs system for Echo
Change-Id: Id745ed6cf1c92695569597fab6ea662bac8c76c0
2013-03-05 12:20:17 -08:00
Reedy 62a433573f Numerous bits of method parameter documentation
Change-Id: Ie4b2657b5e010311b779aa587aa7fa9fc3f19abb
2013-03-01 10:56:58 -08:00
bsitu a05cb46922 Excludes user-dismissed events from count
Change-Id: I44e9707ba279a737dadb8c59013d53f3c67a5177
2013-02-14 11:14:08 -08:00
bsitu 78ad57d43a Abstracting MySQL in Echo so storage type can be swapped easily
Patch Set 6:
	* remove redundant JobQueueDB because it's the default
	* remove extra ;

Change-Id: I25dc0203ed5be1e4989242a87f4fde9c8799de28
2013-02-08 10:34:50 -08:00