mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 10:22:05 +00:00
Rename mention-too-many failure notification.
Change-Id: I49041bd01697ae4c160766f194c92ff3d7a4a989
This commit is contained in:
parent
0815c41560
commit
4c7e5d2669
2
Echo.php
2
Echo.php
|
@ -443,7 +443,7 @@ $wgEchoNotifications = array(
|
|||
'section' => 'alert',
|
||||
'presentation-model' => 'EchoMentionFailurePresentationModel',
|
||||
),
|
||||
'mention-too-many' => array(
|
||||
'mention-failure-too-many' => array(
|
||||
EchoAttributeManager::ATTR_LOCATORS => array(
|
||||
array( 'EchoUserLocator::locateEventAgent' ),
|
||||
),
|
||||
|
|
|
@ -207,7 +207,7 @@ abstract class EchoDiscussionParser {
|
|||
if ( $count > $wgEchoMaxMentionsCount ) {
|
||||
if ( $wgEchoMentionStatusNotifications ) {
|
||||
EchoEvent::create( array(
|
||||
'type' => 'mention-too-many',
|
||||
'type' => 'mention-failure-too-many',
|
||||
'title' => $title,
|
||||
'extra' => array(
|
||||
'max-mentions' => $wgEchoMaxMentionsCount,
|
||||
|
|
|
@ -88,7 +88,7 @@ class EchoMentionFailurePresentationModel extends EchoEventPresentationModel {
|
|||
}
|
||||
|
||||
private function isTooManyMentionsFailure() {
|
||||
return $this->getType() === 'mention-too-many';
|
||||
return $this->getType() === 'mention-failure-too-many';
|
||||
}
|
||||
|
||||
private function getMaxMentions() {
|
||||
|
|
|
@ -354,7 +354,7 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
|
|||
public function testGenerateEventsForRevision_tooManyMentionsFailure() {
|
||||
$expected = array(
|
||||
array(
|
||||
'type' => 'mention-too-many',
|
||||
'type' => 'mention-failure-too-many',
|
||||
'agent' => 'Admin',
|
||||
'max-mentions' => 5,
|
||||
),
|
||||
|
@ -377,7 +377,7 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
|
|||
$this->setMwGlobals( array(
|
||||
// enable mention failure and success notifications
|
||||
'wgEchoMentionStatusNotifications' => true,
|
||||
// lower limit for the mention-too-many notification
|
||||
// lower limit for the mention-failure-too-many notification
|
||||
'wgEchoMaxMentionsCount' => 5
|
||||
) );
|
||||
|
||||
|
|
Loading…
Reference in a new issue