mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 15:36:58 +00:00
Avoid using User::IsIP
Remove using of User::isIP since this method will be hard-deprecated. Now it is soft-deprecated Bug: T275602 Change-Id: Ic1749cbad92bfe0eeae40736403fd5ceb6d504e8
This commit is contained in:
parent
fca6b71a44
commit
107c0dfccd
|
@ -352,8 +352,9 @@ abstract class EchoDiscussionParser {
|
|||
continue;
|
||||
}
|
||||
|
||||
$userNameUtils = MediaWikiServices::getInstance()->getUserNameUtils();
|
||||
// 2. user is an anonymous IP
|
||||
if ( User::isIP( $dbk ) ) {
|
||||
if ( $userNameUtils->isIP( $dbk ) ) {
|
||||
$userMentions['anonymousUsers'][] = $dbk;
|
||||
$count++;
|
||||
$stats->increment( 'echo.event.mention.error.anonUser' );
|
||||
|
@ -1122,8 +1123,9 @@ abstract class EchoDiscussionParser {
|
|||
|
||||
$user = $userMatches[0];
|
||||
|
||||
$userNameUtils = MediaWikiServices::getInstance()->getUserNameUtils();
|
||||
if (
|
||||
!User::isIP( $user ) &&
|
||||
!$userNameUtils->isIP( $user ) &&
|
||||
User::getCanonicalName( $user ) === false
|
||||
) {
|
||||
// Not a real username
|
||||
|
|
Loading…
Reference in a new issue