Commit graph

8 commits

Author SHA1 Message Date
Antoine Musso 7f5b0c1793 Fix EchoTitleLocalCacheTest::testGet corner case
EchoTitleLocalCache title cache resolution ends up querying the database
to resolve title id to Title object.

In some corner case, we might only have one page in the database (UTPage
as provided by MediaWikiTestCase), thus the id 2 would not resolve to a
Title breaking the test.

Use insertPage() to ensure we have a second page.

Bug: T78592
Change-Id: Ia9dbb256f566e489e1c81d89b6a6077831e07fc3
2015-01-09 13:54:08 +01:00
jenkins-bot c5559da8cb Merge "Detect signature using Title class" 2014-10-23 21:25:37 +00:00
Erik Bernhardson 8da75c3a50 Detect signature using Title class
Currently echo attempts to find a signature by looking for a series of
strings starting with what it thinks are the current aliases of NS_USER
and NS_USER_TALK.  This has shown to be error prone, see the linked bug
for how a change to ru.wikipedia.org/wiki/Mediawiki:Signature broke
mention notifications.

Patch switches things arround to pull wikilinks out of the text and run
them through the Title class.  The results of this parsing are checked
for NS_USER and NS_USER_TALK, giving a much stronger guarantee of finding
translated namespaces.

Bug: 71353
Change-Id: Ib0d0f4e068339d2fd28761087c05f5a1acb3c1fc
2014-09-30 19:06:16 -07:00
bsitu 55ef794d74 Add job to keep user notifications in reasonable volume
Change-Id: I4d4fa4c987a1732e5e29536a7669e28c34d4ab18
2014-09-29 23:10:18 +00:00
jenkins-bot d807d9f62e Merge "Hygiene: Move notification type detection to method" 2014-08-25 22:06:17 +00:00
bsitu f29f7303d1 Make timestamp in consistent format after loaded from database
Notification timestamp is generated in MW format (YYYYMMDDHHMMSS)
inside the model and saved to the database in db specific format,
We need to convert it back to MW format when loading the data
from the database, it just happens that MW format is the same
as MySQL timestamp format

Change-Id: Ie881b66c8c24d57a8933c0153e9e7db5fe6aa017
2014-08-22 15:53:51 -07:00
Erik Bernhardson ae3b1f2944 Hygiene: Move notification type detection to method
* Moved most of the content from notify to getEventNotifyTypes
* Added phpunit test verifying per-event config overrides defaults
* Remove special-snowflake welcome handling with proper configuration

Change-Id: Ic1aae11d37f23f2b7b8abe3c1edaa414e29be021
2014-08-22 14:05:47 -07:00
bsitu 092127726b Hygiene: Echo/tests/phpunit/ directory structure should mimic Echo/
Change-Id: I4867d09bb815d621f9feaaf7b8a541e5d817e0d2
2014-08-21 22:58:27 +00:00