https://bugs.php.net/bug.php?id=50688 was closed as fixed
in 2017 when PHP 7.0 was only supported upstream.
We already require PHP 7.2.
Change-Id: Ie9801e38915da634e31c91ebdcb61226e0ae5712
Update to 7880cc18, restores ".mw-echo-alert" class on "class" property
instead of on "link-class" property.
Bug: T284496
Change-Id: I11a04fa5a7e9d0b34e62733ee537a43549d13477
Note: This change would potentially affect all skins including modern
and legacy Vector and others.
The status quo when a talk notification is present is to transform the
talk link into an orange notification message. One option is to leave
the talk link and **add** a notification instead of transforming it.
This will result in two elements #pt-mytalk and #pt-talk-alert
This will interfere with styles targeting #pt-mytalk .mw-echo-alert
This impacts user styles but not anything in production.
Bug: T283811
Change-Id: I3e4be1381f9a2e9986b94b3b13df5ed64d09a59d
Before this commit, setting:
```
$wgVectorConsolidateUserLinks = [
'logged_in' => true
];
```
would result in an orange talk notification that had missing or
incorrect attributes (`#ca-mytalk` instead of `#pt-mytalk` and missing
the `title` and `accesskey` attributes) when visiting modern Vector
with a talk notification visible. The notification's html looked like:
```
<li id="ca-mytalk" class="mw-echo-alert">
<a href="/wiki/User_talk:Newuser5">You have a new Talk page message</a>
</li>
```
The `pt-mytalk` id is important for echo to remove the notification [1].
The title and accesskey are important for accessibility reasons.
This commit corrects that by setting a `link-class`, setting an explicit
`id`, and NOT setting a `class` key. This results in html that is
correct in both modern and legacy Vector:
```
<li id="pt-mytalk">
<a href="/wiki/User_talk:Newuser5" class="mw-echo-alert" title="Your talk page [ctrl-option-n]" accesskey="n">You have a new Talk page message</a>
</li>
```
[1] 67bf58a489/modules/ext.echo.init.js (L172)
Bug: T274428
Change-Id: I5afc74992ad3153ac32df65ccf5fd03b469f05fb
**Note**: This change will affect the order of the yellow talk page
message notification on legacy Vector/other skins by moving it from
after the `#pt-notifications-notice` element to before the
`#pt-notifications-alert` element. This was done because the
notification is related to the list of messages that appear when the
bell icon is clicked so having it in close proximity to that icon is
hopefully more intuitive than having it next to the unrelated inbox
icon. [1]
Per T274428, we need this notification to be inside the `notifications`
array instead of inside the `user-menu` array.
Additionally:
* Per T274428, update the notifications message copy to "You have a new
Talk page message"
* Remove the `onPersonalUrls` hook method inside EchoHooks,
unregister its use as a hook in extension.json, and update its
references in Echo.
[1] T274428#7113896
Bug: T274428
Change-Id: I5ae0ec089bcf0eec1ec7ac13f60e811f54e1d8e1
ContentHandler::getContentText() is deprecated and should be
replaced with Content::getText() for TextContent instances.
Change-Id: Ia92c5a41954b1d21deb39dcafabbdff60a414f55
I think the problem the GROUP BY was trying to solve was the potential
for there to be multiple rows with the same (etp_page,etp_event) pair.
There's no unique index to prevent that, and it would cause the event to
be duplicated in the result set. DISTINCT fixes that without generating
an error with sql_mode='ONLY_FULL_GROUP_BY'.
Per https://dev.mysql.com/doc/refman/8.0/en/distinct-optimization.html
DISTINCT is effectively shorthand for a GROUP BY with all the fields.
Bug: T281329
Change-Id: I6a0d578d729c33241a5c5fbd3f4e83f0e5fab83f
Collect event data and allow modification by a hook.
This allows extensions to look at the events generated so far,
add more events, or remove events.
Bug: T276990
Change-Id: I60818d57552946857077dee93b0adb036621b791
$wgEchoNotifications is checked inside EchoEvent::create(). Similar
code (e.g. onRollbackComplete() in this file) does not check it.
Change-Id: I2be05ae182c3fd5d90b87e9579f8c2aa6b79c655
When one of the $wgEnableEmail and $wgEnableUserEmail variables is
false, "Email from other user" option should not be shown in
preferences.
Bug: T266087
Change-Id: I38e439b778d2679967776757d8e0d3b63519612e
Remove using of User:isBlocked since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T276371
Change-Id: Ibcb9071ce2df2733ee5bd87e077b3c0d034d1212
Remove using of User::getCanonicalName since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T275030
Change-Id: Id708800bc709de175bc7c6acc422368a734b00f1
Adds AttributeManager to EchoServices so that dependencies of
AttributeManager can be injected.
Bug: T275148
Change-Id: I4fa5084d72914d16b6d218e7dd3521f5a1919b80
Remove using of User::isIP since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T275602
Change-Id: Ic1749cbad92bfe0eeae40736403fd5ceb6d504e8
ApiEchoUnreadNotificationPages::getUnreadNotificationPagesFromForeign we
sometime erroneous responses from the foreign wiki. We silently ignore
them since d8a4b6ba9, this add logging of the response payload.
Bug: T273479
Signed-off-by: Thiemo Kreuz <thiemo.kreuz@wikimedia.de>
Change-Id: I4dde4e3bb4ff2ea8b7669bb18b2689410e5e7713
…::getUnreadNotificationPagesFromForeign().
I'm not 100% sure if this fixes the code in a way it is
supposed to work. However, I see that getFromForeign() is
called 3 times in existing code, and 2 of these places
already do an isset() check. It looks like it was just
forgotten here.
Even if there is another issue to fix here, this patch:
a) silences the error, and
b) gives us more useful debug output.
Bug: T273479
Change-Id: I257620f646196c0554b9d86c849a02f5a8b9519c
User::getId() is typehinted to return int and so this cast is causing
Phan failure.
Note the method is deprecated but this patch is not meant to fix that.
Change-Id: I3b7ad419d7c28c3ad7144b8005f2fa387af58b0d
Ia1451e3e802441162eecfc5b7f6a7ba2ae72f377 introduced
the notifications content navigation, which allows skins
to choose where they want notifications to be positioned,
rather than requiring them to manually extract them from
the personal tools.
Bug: T266613
Depends-On: Ia1451e3e802441162eecfc5b7f6a7ba2ae72f377
Change-Id: I7badfd9bf9257b2537596e9f2e93248f52e4bd82