Commit graph

3718 commits

Author SHA1 Message Date
jenkins-bot 28248c0cc2 Merge "Actually insert target page entries when creating an Event" 2016-09-12 21:32:03 +00:00
Translation updater bot bbf4453c6f Localisation updates from https://translatewiki.net.
Change-Id: I4586f151db255fcf154aade64717db2c3920fe96
2016-09-12 23:04:12 +02:00
Stephane Bisson d7845da3f6 resetNotificationCount() from replica with no lag
When notifications are being moderated, the unread count
for affected users has to be recalculated.

It was initially done using DB_SLAVE but it was leading
to inconsistent data since that database did not know
about recently deleted notifications.

It was changed to DB_MASTER but it potentially led
to too many queries on master.

This patch tries to wait for the replica to have
caught up with those changes and use it to update
the unread count for the affected users.

Bug: T93673
Change-Id: Ib4a845e82f686dd7ed807ab21a28490014b56604
2016-09-12 19:59:02 +00:00
Stephane Bisson bc03468473 Actually insert target page entries when creating an Event
This was broken in Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a

Bug: T145232
Change-Id: Ieaad1febaf07bdcf8aee3761afbd039c082fc9ad
2016-09-12 15:05:18 -04:00
jenkins-bot 7f24836607 Merge "Make PresentationModel::getPrimaryLinkWithMarkAsRead() final" 2016-09-12 13:28:05 +00:00
Translation updater bot 2e920d22b7 Localisation updates from https://translatewiki.net.
Change-Id: I8f750d6157a8c16a87ab5c4b08de0359fc2b5ab2
2016-09-11 22:49:29 +02:00
Kunal Mehta 7051cfb2a5 Make PresentationModel::getPrimaryLinkWithMarkAsRead() final
Subclasses should not override this. Also fix the return type phpdoc of
getNotificationCountForOutput().

Change-Id: Ia6963794d3a68dca742fe52ac197edf1575bed76
2016-09-11 12:46:08 -07:00
Translation updater bot f9311bf281 Localisation updates from https://translatewiki.net.
Change-Id: I8c4fc1fe16a6a4b54dfb3e07fa807c913d46e07b
2016-09-10 23:28:41 +02:00
jenkins-bot c01b053025 Merge "Remove js-truncation of descriptions in Special:Notifications desktop" 2016-09-10 02:49:02 +00:00
jenkins-bot 421f955ada Merge "Always cap notification count based on MWEchoNotifUser::MAX_BADGE_COUNT" 2016-09-10 01:39:43 +00:00
Moriel Schottlender 615ffb1125 Always cap notification count based on MWEchoNotifUser::MAX_BADGE_COUNT
Also increase Echo version so we update the cache.

Bug: T144707
Change-Id: Ie939d313c8c6a8168fa3eb3036d9275270575559
2016-09-09 17:15:15 -07:00
L10n-bot b6ae9a4b52 Merge "Localisation updates from https://translatewiki.net." 2016-09-09 20:59:43 +00:00
Translation updater bot 4058116901 Localisation updates from https://translatewiki.net.
Change-Id: I2912cac6c11c88455a1369dc0c0ca1f2b924bc41
2016-09-09 22:54:20 +02:00
jenkins-bot 615553cbd4 Merge "Fix MentionStatusPresentationModel::getSecondaryLinks return value" 2016-09-09 20:50:14 +00:00
Moriel Schottlender 42832ad04a Use echo-badge-count message for cross-wiki counts in Special:Notifications
These numbers are already "capped" for display as 99+ after they pass
100, so we should use this message for proper display.

Individual page number counts are not capped (they are accurate) so
they can remain the same.

Bug: T144707
Change-Id: Iecb877c11e2f372d58f4fc926119dbf3b316e825
2016-09-09 13:11:34 -07:00
Sébastien Santoro ad0cf6cda0 Fix MentionStatusPresentationModel::getSecondaryLinks return value
Any class implementing EchoEventPresentationModel and overriding the
getSecondaryLinks method should return an array (while getPrimaryLink
could return a false boolean value).

This change fixes the following errors:

Warning: array_values() expects parameter 1 to be an array or collection
in …/extensions/Echo/includes/formatters/EventPresentationModel.php on line 494

Warning: array_filter() expects parameter 1 to be an array or collection
in …/extensions/Echo/includes/formatters/EventPresentationModel.php on line 494

This is a follow-up for commit b4b59ee4.

Bug: T145229
Change-Id: Ic66ca03b6979472495c9b748093d01f8f097d56a
2016-09-09 19:59:09 +00:00
Moriel Schottlender a834420533 Remove js-truncation of descriptions in Special:Notifications desktop
In order for the special page to be responsive, the descriptions can't
be truncated in the JS. If they are, they take a bigger portion
of the screen, sometimes going out of its confines.

The popup should still truncate descriptions.

Change-Id: I533f29c00482f6cfbb7b1c9c7417715e3c5809bf
2016-09-09 12:44:03 -07:00
jenkins-bot 10626cbf76 Merge "Add missing dependency to module 'mediawiki.api.options'" 2016-09-09 17:49:42 +00:00
Fomafix 0ec43738aa Add missing dependency to module 'mediawiki.api.options'
Change-Id: I4bdbfacebb7f5b0082fbec542b4c7356e703e837
2016-09-09 17:42:31 +00:00
Stephane Bisson b3c07eedeb Remove etp_user
Target page entries used to exist for each user
that was notified for an event. They were
removed as the notifications were marked as read.

Now they remain so that the association between
pages and events can be used for moderation
regardless of the notifications read status.

This patch removes everything about
echo_target_page.etp_user from sql and php code.

Bug: T143959
Change-Id: Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a
2016-09-09 09:32:28 -04:00
Moriel Schottlender 59c0ad6c4d Make 'Edit threshhold' notif appear regardless of title existence
If a user recieves 'this is your X edit' they should get this notif
regardless of whether the edit they created was deleted. We should
make sure the title is there only for deciding whether or not to
create a link for it; otherwise, the notification will just appear
without a link to the revision.

Change-Id: I00ed4278bb4e15b1e9ddfa2c3af8fad0540fc5f8
2016-09-08 23:01:47 +00:00
jenkins-bot 6d0583a772 Merge "Follow-up 00e0b9f45d: fix typo in method name" 2016-09-08 22:55:55 +00:00
Roan Kattouw b9d4433ee6 Follow-up 00e0b9f45d: fix typo in method name
Bug: T145144
Change-Id: I7a517e2e9b011af1b3d3149f29cc34d5417599c0
2016-09-08 15:49:09 -07:00
Roan Kattouw 48ca4aeb5e ModerationController: Update count from master, not slave
At the time that resetNotificationCount() is called, we've only
just moderated something, so the slave won't have those changes yet,
and the computed notification count will be wrong.

Change-Id: Ia83f2b9cf7f4bbaee25e03f7bc8f73bcd4d345f9
2016-09-08 15:26:07 -07:00
Translation updater bot f98b2e2b52 Localisation updates from https://translatewiki.net.
Change-Id: I1ca1a6c0d27ad657e2ea423871daff674deb0706
2016-09-08 23:43:56 +02:00
Moriel Schottlender 00e0b9f45d Make seen/unseen badge more consistent across wikis
- Add a 'hasUnseen' data to the xwiki bundle so the badge can
  consider its value when changing its color even without the
  bundle being opened.
- Check and store seenTimes from all sources that the xwiki
  has in a new JS object that the SeenTimeModel can store

Bug: T134855
Change-Id: Ifdcee88b4378cdc7acb4ae5c0cbc60b76339757e
2016-09-08 12:40:15 -07:00
Chad Horohoe da4f8f5db9 Use static cache for times so it works across instances of SeenTime
Follows-up If6319a02. Making the cache static enables us to reuse
the in-process cache across multiple instances of the class.

Bug: T144534
Change-Id: I1a594830f13d56ab4e0e636a3cdb5e96379e990a
2016-09-08 12:24:46 -07:00
WMDE-Fisch a04c10790a Fix missing doc part for mention status global
Change-Id: Ifdcc6605bb121523e3f8586f1d107d1407c711f3
2016-09-08 14:46:10 +02:00
jenkins-bot 39720f926b Merge "Break more rules in break-word so long words can wrap in notifications" 2016-09-08 00:06:47 +00:00
Moriel Schottlender ed453c1026 Hide separator when bundled item is expanded
Bug: T142260
Change-Id: I5ea12d426c29a4b82bdfa5453d14841800b7a108
2016-09-07 16:44:03 -07:00
Moriel Schottlender 22d83568f7 Break more rules in break-word so long words can wrap in notifications
Change-Id: Ib0cde96438175f2bc136bd89d4a2717785cecba0
2016-09-07 16:32:37 -07:00
Translation updater bot 3a4a2d3ff2 Localisation updates from https://translatewiki.net.
Change-Id: I5c2f30814e7c4239f70ed5c4a551cce9d9495121
2016-09-07 22:42:22 +02:00
Moriel Schottlender eb98b21dfe Add 'canRender' check to EchoMentionStatusPresentationModel
Change-Id: Ica338ff5810b62849d30e5b27709558f1b797c43
2016-09-06 14:44:51 -07:00
jenkins-bot 4a680a1e78 Merge "Add method to get local unread notifications in the manager" 2016-09-06 21:28:50 +00:00
L10n-bot f521349c8d Merge "Localisation updates from https://translatewiki.net." 2016-09-06 20:46:56 +00:00
jenkins-bot fc63f11b64 Merge "SeenTime: Wrap cache with CachedBagOStuff" 2016-09-06 20:43:38 +00:00
Translation updater bot fad121d04a Localisation updates from https://translatewiki.net.
Change-Id: Ib5b1cd5d59faf05c18dc339d9a8a2f4a5315bc1c
2016-09-06 22:41:46 +02:00
Moriel Schottlender 93f4f2a460 Add method to get local unread notifications in the manager
Bug: T141404
Change-Id: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
2016-09-06 13:07:57 -07:00
Kunal Mehta b3cdd56952 SeenTime: Wrap cache with CachedBagOStuff
That adds an in-process cache so we don't have duplicate key lookups on
every request.

Bug: T144534
Change-Id: If6319a026c457a32bfde0e212c6193aa728cb208
2016-09-06 13:06:26 -07:00
Translation updater bot 23eab2f799 Localisation updates from https://translatewiki.net.
Change-Id: I943edd5986898ccb9006d24d7e46cbf39f6df75b
2016-09-05 22:41:47 +02:00
Jakob Warkotsch f77d2eff6c Improve mention success and failure messages.
Bug: T143084
Change-Id: Ia6ed8acf33a39971fbe2927ebbb7b403838efc80
2016-09-05 12:33:49 +02:00
Translation updater bot 2b3d5e44f8 Localisation updates from https://translatewiki.net.
Change-Id: I55e938b130b7a66e54dc613a4ed57acd854129a1
2016-09-04 22:28:46 +02:00
Translation updater bot ab4063181b Localisation updates from https://translatewiki.net.
Change-Id: I7db6f341e3f5a5eca5547b60ccb5d24307643f36
2016-09-04 00:20:11 +02:00
jenkins-bot 32e8a8c845 Merge "Add confirmation popup widget" 2016-09-02 23:28:09 +00:00
Translation updater bot 5114505570 Localisation updates from https://translatewiki.net.
Change-Id: If9279455489bffe254b316fa2298836ca8d28cbc
2016-09-02 22:54:54 +02:00
jenkins-bot 4ca6513039 Merge "Hide xwiki widget separator when widget is expanded" 2016-09-02 19:56:22 +00:00
Ed Sanders 44140295ce Remove apparently unused PNG files
The repo is now PNG-free.

Change-Id: Ia76505473fc99365781735a19ece4d028eaec528
2016-09-02 12:28:28 -07:00
Moriel Schottlender df38f142ef Followup I3daae156d: Don't truncate body text for small screens
We already took away the truncation of header text, the body should
follow for narrow screens and wrap, instead of using the ellipses
truncation.

Change-Id: I3504599044e1c94ccec55c420d455b9370dae474
2016-09-02 11:27:56 -07:00
jenkins-bot 05d05d2c56 Merge "Fix notification page width responsiveness issues" 2016-09-02 17:22:00 +00:00
jenkins-bot cf7cf0dd66 Merge "Provide title when parsing wikitext" 2016-09-02 01:48:33 +00:00