Provides the first step of adding and populating a new database field
for Echo oversight deployment. The new field is populated via a
maintenance script and Event::loadFromRow will accept both new and old
results. Everything will still run when the 2 now unused fields are
later dropped from the db.
Bug: 48059
Change-Id: I24d4b61a061f94ed9aaaa6087f33b2ab37f773cd
Adjusted the edit-user-talk event creation to detect and record which section
of the talk page was edited. Flyout, special page, and email messages have
been adjusted to use this section title as a URL fragment when available.
Bug: 46937
Change-Id: I161e2ffda2f2540f64de90cc621fb3b69479d0db
While writing tests i noticed that this is dead code that will never be called. It
was originally used but several commits have piled up to cause its deprecation.
Upon review of the git history it seems the general idea behind content-* turned
into the 'payload' key. the commentText formatting was moved to payload for future
use, the i18n keys have been pruned.
Change-Id: I5ef360759db53d54a834afc8b71e9c8807de0284
Since talk page edits don't necessary belong to a seciton (or may
involve several sections), we'll need to be more clever in the
DiscussionParser to extract it for the long term solution. This
temporary solution will expose any section link in the edit summary
payload so that people can jump straight to the section if they
want to (same as existing behavior in the archive version).
Bug: 47954
Change-Id: I2745ba194ba1f9b5b7c446588da6586e87d35b31
* Icon can be defined using a path or a URL
* Extensions don't need custom CSS, but add icon through BeforeCreateEchoEvent
* Sites set their notification icon in LocalSettings.php or equivalent
Bug: 46585
Change-Id: Ifc02b653d07de19229dfb2604305e32f3bd595fe
* 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
* 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
It doesn't make sense to create 2 tokens for the i18n message in one
case and only 1 token in another case. The current i18n messages are
designed to handle only 1 token for agent (for both grammar and display).
Change-Id: I7ab6b5a7b6731e60d0ea6e9e590c15039fdc4459
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
Since every event is tied to a category, it's better for event object to have it as a member method
Change-Id: I911415284486bb11d13d91366340c5c330317c34
1. Keep it as protected like the rest of the variables and there is an accessor method getType() for external access
2. Add some more documentation
Change-Id: I26b20e6b211a7dbfa96cf57eb87621698015646e
Flyout links were being displayed as raw URLs rather than regular links.
Likely caused by a bad rebase merge.
Change-Id: I96b1db67fa919d282ae9abfbd9c039473d400303
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
Specifying the class directly is much less confusing and fragile.
Plus we have way too many things named 'type'.
Also changing MWEchoArticleLinkedFormatter to EchoArticleLinkedFormatter
to match the convention of the other formatter classes.
Also making EchoBasicFormatter the default, so that the Hello World
case is easier to implement.
Change-Id: Ibd9b15008d37ad815e466ab81ba9a5b668ee2791
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
This is replacing the implementation I did for 'html-light'.
The reason html-light doesn't work is that we don't have any way
of reliably determining which parameter should be the one that is
linked to in the notification title (flyout notifications are only
supposed to have one link). With this system, the notification
definer can specify a separate message/params combination to use
specifically for the notification flyout. If they don't specify
these, it falls back to the normal title message/params.
Change-Id: I35394849cf99307eba4a76e079333d19514fdb5d
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
Payload components can include edit summary, edit snippet, welcome message.
This replaces the older 'content' system which constructed a payload
from an arbitrary message + parameters (but only supported a single
message).
Change-Id: I9a5e1d69f0c8296bb2bb79cb3f26e67aa34592bb
patch set 3: change emails to e-mails
patch set 4: make email-footer a parameter for email-body, this gives more flexibility so the footer can be defined directly inside email body or a separate message.
patch set 5: update email copy, still waiting for legal to finalize, :(
patch set 6: update email copy, remove whitespace, update preference link, the copy is finalized, :)
Change-Id: Ia5e8336f1c142c8f040efd0174696c7952c391a9
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
Fatal error: Call to a member function equals() on a non-object in /usr/local/apache/common-local/php-1.21wmf4/extensions/Echo/formatters/CommentFormatter.php on line 28
Change-Id: If6867aeb0b4c3f6b4229f748e9791f3e74a4ef87
* Supports 'undo' and 'rollback' currently
* Also includes adding the edit summary used to all edit notifications.
* Also fixes a minor bug that made it seem like all EchoNotificationJobs were failing.
* Added revert icon to CSS
Change-Id: Id22470107b071cdbce33da7cf3dfd09d22947644
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
First implementation of "two line" formatting.
Messages have a title and optional content.
Distinguishing writing on "your talk page" from another talk page in messages.
Change-Id: I9051e4bfb66d1c25c1bf68ec092b52fd90544336
Uses the class EchoDiscussionParser to understand actions taken on
vanilla MediaWiki discussion pages.
Currently notifies on these occasions:
* A new comment is added to a discussion on your talk page or that
you have participated in.
* A new topic is added to your talk page.
There are vague plans to expand to these classes of events:
* Your comment is edited or removed.
* A large section is moved to your talk page.
and these classes of users:
* Users watching discussion pages.
Change-Id: Ie6cae76ed2e0ecf607059e39ac1aa480a275ec89