mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Check for empty strings in markasread query param
explode always returns an array with one item, even for the empty string Filter out every possible empty string Change-Id: I0cf0794c0f3e0eedab7e5626e973d8458b28e46a
This commit is contained in:
parent
76227585f9
commit
a0cb29f1a2
|
@ -857,7 +857,7 @@ class EchoHooks implements RecentChange_saveHook {
|
|||
}
|
||||
|
||||
// Attempt to mark as read the event IDs in the ?markasread= parameter, if present
|
||||
$markAsReadIds = explode( '|', $request->getText( 'markasread' ) );
|
||||
$markAsReadIds = array_filter( explode( '|', $request->getText( 'markasread' ) ) );
|
||||
$markAsReadWiki = $request->getText( 'markasreadwiki', wfWikiID() );
|
||||
$markAsReadLocal = !$wgEchoCrossWikiNotifications || $markAsReadWiki === wfWikiID();
|
||||
if ( $markAsReadIds ) {
|
||||
|
|
Loading…
Reference in a new issue