diff options
Diffstat (limited to 'inc')
-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) { |