From b2cb24f59e0329fab201dad814283d5247a92151 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 4 Jun 2021 13:27:57 +0200 Subject: [PATCH] Rename `IpAddress::mask()` to `IpAddress::toMasked()` --- com.woltlab.wcf/templates/accountSecurity.tpl | 2 +- wcfsetup/install/files/lib/util/IpAddress.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/templates/accountSecurity.tpl b/com.woltlab.wcf/templates/accountSecurity.tpl index 071203228d..4ab78ecb61 100644 --- a/com.woltlab.wcf/templates/accountSecurity.tpl +++ b/com.woltlab.wcf/templates/accountSecurity.tpl @@ -83,7 +83,7 @@
{if $session->isCurrentSession()}{lang}wcf.user.security.currentSession{/lang}{else}{@$session->getLastActivityTime()|time}{/if}
{lang}wcf.user.security.ipAddress{/lang}
-
{$session->getIpAddress()->mask(16, 48)}
+
{$session->getIpAddress()->toMasked(16, 48)}
diff --git a/wcfsetup/install/files/lib/util/IpAddress.class.php b/wcfsetup/install/files/lib/util/IpAddress.class.php index 061c2b8a6b..574fbafce5 100644 --- a/wcfsetup/install/files/lib/util/IpAddress.class.php +++ b/wcfsetup/install/files/lib/util/IpAddress.class.php @@ -80,7 +80,7 @@ final class IpAddress /** * Returns a new IP address with the last $maskX bits masked off. */ - public function mask(int $mask4, int $mask6): self + public function toMasked(int $mask4, int $mask6): self { if ($mask4 < 0 || $mask4 > 32) { throw new \InvalidArgumentException('Given $mask4 is not in the interval [0, 32].'); -- 2.20.1