mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Merge "build: Updating composer dependencies"
This commit is contained in:
commit
f281b221eb
|
@ -3,8 +3,8 @@
|
|||
"jakub-onderka/php-parallel-lint": "1.0.0",
|
||||
"mediawiki/mediawiki-codesniffer": "29.0.0",
|
||||
"jakub-onderka/php-console-highlighter": "0.4.0",
|
||||
"mediawiki/minus-x": "0.3.2",
|
||||
"mediawiki/mediawiki-phan-config": "0.9.0"
|
||||
"mediawiki/minus-x": "1.0.0",
|
||||
"mediawiki/mediawiki-phan-config": "0.9.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test": [
|
||||
|
|
|
@ -455,10 +455,8 @@ abstract class EchoDiscussionParser {
|
|||
}
|
||||
|
||||
$userIdentity = $revision->getUser();
|
||||
if ( $userIdentity !== null ) {
|
||||
$userID = $userIdentity->getId();
|
||||
$userName = $userIdentity->getName();
|
||||
}
|
||||
$userID = $userIdentity ? $userIdentity->getId() : 0;
|
||||
$userName = $userIdentity ? $userIdentity->getName() : '';
|
||||
$user = $userID != 0 ? User::newFromId( $userID ) : User::newFromName( $userName, false );
|
||||
|
||||
$prevText = '';
|
||||
|
|
|
@ -1523,7 +1523,8 @@ class EchoHooks {
|
|||
|
||||
// Delete notifications
|
||||
$ids = array_merge( $selfIds, $welcomeIds, $thankYouIds );
|
||||
if ( $ids ) {
|
||||
// @phan-suppress-next-line PhanImpossibleTypeComparison Each array in the merge may be empty
|
||||
if ( $ids !== [] ) {
|
||||
$dbw->delete(
|
||||
'echo_notification',
|
||||
[
|
||||
|
|
|
@ -278,6 +278,7 @@ class ApiEchoNotifications extends ApiQueryBase {
|
|||
/** @var EchoNotification $overfetchedItem */
|
||||
$overfetchedItem = count( $notifs ) > $limit ? array_pop( $notifs ) : null;
|
||||
|
||||
$bundler = null;
|
||||
if ( $bundle ) {
|
||||
$bundler = new Bundler();
|
||||
$notifs = $bundler->bundle( $notifs );
|
||||
|
@ -289,7 +290,7 @@ class ApiEchoNotifications extends ApiQueryBase {
|
|||
$output = EchoDataOutputFormatter::formatOutput( $notif, $format, $user, $this->getLanguage() );
|
||||
if ( $output !== false ) {
|
||||
$result['list'][] = $output;
|
||||
} elseif ( $bundle && $notif->getBundledNotifications() ) {
|
||||
} elseif ( $bundler && $notif->getBundledNotifications() ) {
|
||||
// when the bundle_base gets filtered out, bundled notifications
|
||||
// have to be re-bundled and formatted
|
||||
$notifs = array_merge( $bundler->bundle( $notif->getBundledNotifications() ), $notifs );
|
||||
|
|
Loading…
Reference in a new issue