mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-24 10:49:37 +00:00
Merge "Remove unused EchoDiscussionParser::getNotifiedUsersForComment()"
This commit is contained in:
commit
c4b00cfda7
|
@ -203,45 +203,6 @@ abstract class EchoDiscussionParser {
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a Revision object, determines which users are interested
|
||||
* in related EchoEvents.
|
||||
*
|
||||
* @param $revision Revision object.
|
||||
* @return Array of User objects
|
||||
*/
|
||||
static function getNotifiedUsersForComment( $revision ) {
|
||||
$interpretation = self::getChangeInterpretationForRevision( $revision );
|
||||
$users = array();
|
||||
|
||||
foreach ( $interpretation as $action ) {
|
||||
if ( $action['type'] == 'add-comment' ) {
|
||||
$fullSection = $action['full-section'];
|
||||
$interestedUsers = array_keys( self::extractSignatures( $fullSection, $revision->getTitle() ) );
|
||||
|
||||
foreach ( $interestedUsers as $userName ) {
|
||||
$user = User::newFromName( $userName );
|
||||
|
||||
// Deliberately ignoring anonymous users
|
||||
if ( $user && $user->getID() ) {
|
||||
$users[$user->getID()] = $user;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $revision->getTitle()->getNamespace() == NS_USER_TALK ) {
|
||||
$userName = $revision->getTitle()->getText();
|
||||
$user = User::newFromName( $userName );
|
||||
|
||||
if ( $user ) {
|
||||
$users[$user->getID()] = $user;
|
||||
}
|
||||
}
|
||||
|
||||
return $users;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a Revision object, returns a talk-page-centric interpretation
|
||||
* of the changes made in it.
|
||||
|
|
|
@ -372,7 +372,6 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
|
|||
// - stripHeader
|
||||
// - stripIndents
|
||||
// - stripSignature
|
||||
// - getNotifiedUsersForComment
|
||||
|
||||
public function testDiscussionParserAcceptsInternalDiff() {
|
||||
global $wgDiff;
|
||||
|
|
Loading…
Reference in a new issue