This ensures that the fallback timestamp is used if the list is
still empty. Not doing this causes the wikis in the cross-wiki bundle
to appear in the wrong order. Also, it makes more sense to use the
model as the source of truth regardless.
Bug: T138115
Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
- Remove duplicated counter adjustments.
- Differentiate between all IDs to mark as
read vs. all IDs that represent visible
notifications when adjusting the counter.
Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
Adds $wgEchoSectionTransition and $wgEchoBundleTransition.
If either of these settings is enabled, we will disbelieve
the alert/message counts in the euw table and obtain them
using server-side cross-wiki API queries instead.
This affects both ApiEchoNotifications (for generating the cross-wiki
summary entry) and the count and timestamp computation in NotifUser.
In bundle transition mode, we trust that notifications are classified
correctly between alerts and messages, but we don't trust the
counts in the table. In section transition mode, we trust that
the sum of the alert and message counts is the correct count,
but we don't trust the alert and message counts individually.
If both modes are enabled, we mistrust anything that's mistrusted
by either mode and only trust what's trusted by both modes.
In any event, we do trust that only the wikis with rows in the
euw table have unread notifications.
Bug: T132954
Change-Id: Ibcc8ac102dac3cf06916d67427b42457fdb93db6
This is already done in EditUserTalk-, Mention- and RevertedPresentationModel,
so PageLinked- should be consistent.
Change-Id: I4786406cabab778250d72c7ed92701b940a0a9f7
In rebuild mode, we only process users who already have
a row in the euw table. This reduces the number of users
we have to process significantly. Thanks to Stephane
for this idea.
Also, don't force a recache of the alert and message counts,
it's OK to fetch them from cache. We also don't need to invalidate
any caches in this script, because the transition flag from
Ibcc8ac102 will ensure that the cached global counts are
correct.
Change-Id: I69c54cac47468647df2778b2d82f1b5dd9e574d3
Better idea: invalidate caches in this script, and write
a separate script to recompute existing euw rows.
This reverts commit c83af257d2.
Change-Id: I57bccfb726eada646cb318206d9091a20d59dcf5
So we can easily query the notification rows that belong to
a given event row. This is needed for the removeOrphanedEvents
maintenance script to run efficiently.
Change-Id: I99fc31a62b37259d7000577583c8e8a599e400f9
This is done the quick way by just turning
off a config option. The full cleanup
is in I095704252eaf2f8fe71950a4cfcd42a6fce431ff
Bug: T132525
Change-Id: I5becaa2f91b7eff6ebe4ce3943e86975c844c884
The "Mark all as read" button had margins that made it just a little
bit taller than the header would otherwise be. This pushed the
bottom border of the header and the top border of the first notification
away from each other.
We only need top and right margins on this button, so drop the
bottom and left margins.
Bug: T137778
Change-Id: I8d47d84c79cbdad707b8cbaa8d43187c054755b3
This should have been done from the beginning; the model manager
pulls models by their symbolic names. So far, we've used the source
for that, but that assumes that two modules always have different
sources, and that is absolutely not necessarily the case.
For example, internal local bundles will each be a model, but have
the same ('local') source. They should still be differentiated in
the manager by their names, but the source should state clearly that
it is local.
For this, the models now have "getName" method and the name is
created separately from their source. Items also preserve a
reference to their parent's symbolic name so they can provide
that for items that require the controller to manipulate a specific
model.
Change-Id: I8c39d5d28383d11fb330addce21e07d5c424da6f