Commit graph

52 commits

Author SHA1 Message Date
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
bsitu b34e30cefb Fix a possible db cache issue for job runner
Do not cache db object, this may be causing issue for inter wikis

Change-Id: I127fe05c919c1d20d466c7281f01eef1983270de
2013-04-18 16:01:12 -07:00
bsitu 79e66c4268 Remove the redundant db, lb static cache layer
They are already cached in db and lb object

Change-Id: I3e4db98a3eecdf184db64274b3914eec076af905
2013-04-18 14:33:38 -07:00
jenkins-bot 5833846c44 Merge "Add 'Mark all as read' button to overlay" 2013-04-18 18:41:47 +00:00
jenkins-bot 5f21312587 Merge "Email digest header tweaks" 2013-04-18 18:20:57 +00:00
jenkins-bot a534f7b239 Merge "Split out notification emails to a separate from address so they can be configured as specified for launch." 2013-04-18 18:13:37 +00:00
jenkins-bot 3669ea0972 Merge "Add exception to email job so error will be tracked" 2013-04-18 18:13:28 +00:00
lwelling e1f03a8c0e Split out notification emails to a separate from address so they can
be configured as specified for launch.

Part of https://bugzilla.wikimedia.org/show_bug.cgi?id=46670

Change-Id: I06a73aae95bc4b6776a0554b624eccfc4602bc65
2013-04-18 13:55:13 -04:00
bsitu f5807257b1 Add exception to email job so error will be tracked
Change-Id: I59ad29ddcf961f4d5582095b04eb77f616bc40c0
2013-04-18 10:30:27 -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 c7922a366c Email digest header tweaks
Plus adding escape to some of the messages

Bug: 47095
Change-Id: I296de4e5ebe92b737837c7ddcf3f631b16a9cf8b
2013-04-17 14:43:31 -07:00
bsitu a98aaacf38 Add nextSequenceValue() to support dbs like PostGres
Change-Id: I7af8391fc88d0336b83dba449f52709f309b6833
2013-04-17 13:58:13 -07:00
jenkins-bot d9a4bb7bb9 Merge "Pref for showing notifications" 2013-04-17 17:15:51 +00:00
Kaldari 6388779640 Pref for showing notifications
If this pref is turned off, we revert to the old orange bar talk
page notifications. Depends on core change Ifc8fbaf8.

Bug: 46550
Change-Id: If21f3aac51e484c5e077c7f4b5a2218e8b71ed2a
2013-04-17 09:55:05 -07:00
bsitu 8e32625e6e Should not send bundle emails if users change mail option
If a user switches to email digest, we should not send or schedule any bundle emails, otherwise, a user may keep getting bundle emails till bundle cycle reset

Change-Id: Id8e4f39cad4c61dc9a044558307f0d654193cd49
2013-04-11 21:40:39 -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 2be8a547a0 Add external db support to Echo
Change-Id: I84b0d904795d858d88d8e52c22f00d81c0e81303
2013-04-09 17:59:17 -07:00
bsitu 7ca8d2e4a2 (bug 47023) Add array type check before being used in foreach loop
Change-Id: I28e7f1a52b337ee0a4b012ad31e8054c8f6798ed
2013-04-08 16:43:18 -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
bsitu a65a00b709 use numParams() for numeric argument
Change-Id: I8af2ca9067a6b7ae900b9d64e7c8b2be0948dab7
2013-03-24 08:19:40 +00:00
bsitu 2d0e5ee536 Consolidate messages and fix dismiss title
1. Dismiss title should be based on $event->getCategory() instead of $event->getType()
2. Remove various echo-email-batch-category-header-* messages
3. update echo-dismiss-title-* to echo-category-title-*

Change-Id: I02fc85072f3d5967668c94eb28c8ecff606023d0
2013-03-21 11:22:28 -07:00
bsitu 5c701f80ef Add getCategory() method to event object
Since every event is tied to a category, it's better for event object to have it as a member method

Change-Id: I911415284486bb11d13d91366340c5c330317c34
2013-03-18 16:30:39 -07:00
Kaldari 6e8aa9b808 Merge "(bug 46046) Notification should not be created for anon users" 2013-03-15 00:33:49 +00:00
bsitu 345fdb81e2 (bug 46051) mentioned users should not be as object in database
Change-Id: Id96ade333d8150fdc357db47cba9a609f9e7e108
2013-03-13 12:30:20 -07:00
bsitu ded706dd73 (bug 46046) Notification should not be created for anon users
Anon users would not see or receive notifications, it is a waste of storage space

Change-Id: Id150be111337f434d0f1471bb8049ed75a0c53a5
2013-03-12 15:52:00 -07:00
Bsitu cbdae004fa Merge "Making defaultUserOptions based on category to match preferences" 2013-03-07 19:01:08 +00: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
lwelling 5189f1cf2d Just correcting a class name
Change-Id: I516ea5070cb440300b7bcdccc142aab9a9f6f1d1
2013-03-06 17:43:26 -05:00
Kaldari 8357f4bd75 Implementing new prefs system for Echo
Change-Id: Id745ed6cf1c92695569597fab6ea662bac8c76c0
2013-03-05 12:20:17 -08:00
Bsitu 3be58d5738 Merge "Remove a couple of unused variables" 2013-03-01 19:11:22 +00:00
Reedy 62a433573f Numerous bits of method parameter documentation
Change-Id: Ie4b2657b5e010311b779aa587aa7fa9fc3f19abb
2013-03-01 10:56:58 -08:00
Reedy b4b7cd926c Remove a couple of unused variables
Change-Id: I45e0b6e7c2ae8e2235ff8f85c95c657e0e05fc9e
2013-02-28 23:34:10 +00:00
Andrew Garrett dc6a3cb6d0 Add a "mention" notification
Any user whose user page is linked in a comment on a talk page will get a notification of that.

Weaknesses: Currently this mention notification is additive.
We may want to restrict it to only cases where the user would not
otherwise be notified of the comment

patch set 3:
	* user + instead of array_merge for merging subscription users
	* rename $user to $agent to avoid name confilict in generateMentionEvents()
	* add check for possible null object
	* users should not receive 'mention' notification on their own talk pages

patch set 4:
	* add more descriptive comment
	* check for empty notification list before creating mention event

patch set 5:
	* Fix a parse error, change [ to {

patch set 10:
	* rebase

patch set 11:
	* adding flyout messages, updating params for other messages

Change-Id: I76b80db1f325d9569f36c506d14c8c875bba4a34
2013-02-24 20:38:11 -08:00
bsitu a05cb46922 Excludes user-dismissed events from count
Change-Id: I44e9707ba279a737dadb8c59013d53f3c67a5177
2013-02-14 11:14:08 -08:00
bsitu b21e50333d Update comment and db selection
Change-Id: I08c1437d58a7811f784a068012de5018b82f0c09
2013-02-13 11:50:25 -08:00
Kaldari af06e26de6 Adding dismiss functionality to special page
Includes new web preferences for Echo

Also adding ability to set dismissability per notification type

Still need to arrange subscription options into a friendly format

Still need to add dismiss functionality to flyout

Change-Id: I484a24b424e69be3640e63b76f82735edae6f13a
2013-02-12 11:33:50 -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
bsitu e8551bf1b6 Add missing variable for template parsing
Change-Id: I75c4a59f798f39cdb74e0ab4edaa7d1f46615347
2012-12-19 17:38:35 -08:00
bsitu a698cdbff2 Remove code for disabled event types
Change-Id: I30a5fec1e3275d53904c9bf20f2eb70db5fc0819
2012-12-19 17:00:19 -08:00
bsitu 6b8571403a Initial check-in for email batch
patch set 3:
	* add gender support to various messages
	* tweak variables a little bit, e.g. move class variables to function local variables
patch set 4:
	* update various email to e-mail in i18n file
	* add support to process only valid echo events
	* add global email footer
	* add the new table schema to core schema file
patch set 5:
	* remove trailing white space
	* add missing semicolon to return statement in Notifier::notifyWithEmail()
patch set 8:
	* some change based on newest feature requirement

Change-Id: I3298617dab4c04c4d6d486469120fc2d0c986b66
2012-12-12 12:00:13 -08:00
bsitu af027a0dd7 Remove redundant condition from if statement
Change-Id: I5e12b5766f9cc8aa546833756778c8cf2c3bddbe
2012-11-27 14:16:18 -08:00
bsitu 4bcc575ff8 (bug 41139) message snippets in notif should skip templates
patch set 2: remove trailing whitespace
patch set 3: remove unnecessary variable and add @return to function comment
patch set 4: remove redundant intval() and update commit message

Change-Id: I6abfa7d820433e008d8bdcc5843515cd4823dd02
2012-11-21 14:38:07 -08:00
bsitu 9fb50b353a Add database replication delay handling to Echo
patch set 3: Use Title::GAID_FOR_UPDATE instead of 1/0

Change-Id: I16bcec3699daaa143599cd50751521114f56aec3
2012-11-14 15:27:24 -08:00
Reedy 236fff2f03 Call to a member function getNamespace() on a non-object
Fatal error:  Call to a member function getNamespace() on a non-object in /usr/local/apache/common-local/php-1.21wmf4/extensions/Echo/includes/DiscussionParser.php on line 57

Change-Id: I31ebf8ea47ce6378a5763f1fd59d27a9247c870a
2012-11-14 20:14:42 +00:00
Siebrand Mazeland 69d91fa1b6 Update documentation and deprecated methods.
Basically having fun with the code analyzer.

Also:
* remove unused local variable assignments
* missing return values
* CSS optimizations.
* Initialize possible unset variables.

Change-Id: I77aa08ecb48eeda08f14dc38d7f35d57ea9fa110
2012-09-02 11:30:38 +02:00
Siebrand Mazeland 950f74eba8 Follow-up I2c10cb69: Auto-formatted using IDE.
Change-Id: Iedeaca3c31195a5cf7df8dd38d6332cfabffcc67
2012-08-31 23:50:46 +02:00
Krenair 9559105b59 Use whitespace between function parameters and the brackets.
Change-Id: I2c10cb69f1f1726b63d25579c6a35c882cc1fe7e
2012-08-30 17:04:39 +01:00
Andrew Garrett 094e714096 Fix for bug 39085
Edits to talk pages were being compared to the previous revision e ven when there was no previous revision.

Change-Id: Id45575dca2ec121fc469019ad9384d035af96d51
2012-08-13 15:57:57 +01:00
Andrew Garrett 80a8b99719 Echo: Fix bugs related to replication lag
Change-Id: I9f49796c3e85cae5f9bd996ed0cb30720b244056
2012-08-01 16:25:32 -07:00
Andrew Garrett 2378a39950 Echo: A few adjustments based on feedback from Ryan Kaldari and Benny Situ.
Change-Id: If430c02793a1843253ccc18512075befc99a3eb6
2012-08-01 15:08:58 -07:00