diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-25 08:01:18 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-25 08:01:18 +0200 |
commit | d7c2f0cc47d829b1f242a10f03d15d80d28f3c0f (patch) | |
tree | ef8c1c9ba65cc0bb9b0a449f9110fd6739ae0c63 | |
parent | 27574abf4678f8b5eb731ed9cf7157e2fdb1f30d (diff) | |
download | wallabag-d7c2f0cc47d829b1f242a10f03d15d80d28f3c0f.tar.gz wallabag-d7c2f0cc47d829b1f242a10f03d15d80d28f3c0f.tar.zst wallabag-d7c2f0cc47d829b1f242a10f03d15d80d28f3c0f.zip |
fix bug #175 IP addresses do not appear in view original
-rw-r--r-- | inc/poche/Tools.class.php | 8 |
1 files changed, 1 insertions, 7 deletions
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 | |||
216 | 216 | ||
217 | public static function getDomain($url) | 217 | public static function getDomain($url) |
218 | { | 218 | { |
219 | $pieces = parse_url($url); | 219 | return parse_url($url, PHP_URL_HOST); |
220 | $domain = isset($pieces['host']) ? $pieces['host'] : ''; | ||
221 | if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) { | ||
222 | return $regs['domain']; | ||
223 | } | ||
224 | |||
225 | return FALSE; | ||
226 | } | 220 | } |
227 | 221 | ||
228 | public static function getReadingTime($text) { | 222 | public static function getReadingTime($text) { |