From d7c2f0cc47d829b1f242a10f03d15d80d28f3c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 25 Aug 2013 08:01:18 +0200 Subject: fix bug #175 IP addresses do not appear in view original --- inc/poche/Tools.class.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'inc/poche/Tools.class.php') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 8661ab6e..3a792d43 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -216,13 +216,7 @@ class Tools public static function getDomain($url) { - $pieces = parse_url($url); - $domain = isset($pieces['host']) ? $pieces['host'] : ''; - if (preg_match('/(?P[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) { - return $regs['domain']; - } - - return FALSE; + return parse_url($url, PHP_URL_HOST); } public static function getReadingTime($text) { -- cgit v1.2.3