diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index bd7389ff8..ad667ba07 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -127,7 +127,7 @@ function getIpaddress() { if($this->isGranted()) return $this->get('ipaddress'); - return preg_replace('/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/','*.$1.$2.$3', $this->get('ipaddress')); + return preg_replace('/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/','*.$2.$3.$4', $this->get('ipaddress')); } function isExistsHomepage() { diff --git a/modules/document/document.item.php b/modules/document/document.item.php index d572e2dcf..76b1e7863 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -173,7 +173,7 @@ function getIpaddress() { if($this->isGranted()) return $this->get('ipaddress'); - return preg_replace('/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/','*.$1.$2.$3', $this->get('ipaddress')); + return preg_replace('/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/','*.$2.$3.$4', $this->get('ipaddress')); }