Merge "Remove unused EchoDiscussionParser::getNotifiedUsersForComment()"

This commit is contained in:
jenkins-bot 2015-06-10 03:41:46 +00:00 committed by Gerrit Code Review
commit c4b00cfda7
2 changed files with 0 additions and 40 deletions

View file

@ -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.

View file

@ -372,7 +372,6 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
// - stripHeader
// - stripIndents
// - stripSignature
// - getNotifiedUsersForComment
public function testDiscussionParserAcceptsInternalDiff() {
global $wgDiff;