From b64a882696ba6c403c36f9434230fc636741b7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 23 Aug 2013 21:30:55 +0200 Subject: notice with poche_version undefined' --- inc/poche/Tools.class.php | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'inc/poche/Tools.class.php') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 1baf745d..52d0f2d5 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -238,25 +238,20 @@ class Tools public static function createMyConfig() { $myconfig_file = './inc/poche/myconfig.inc.php'; + + if (!is_writable('./inc/poche/')) { + self::logm('you don\'t have write access to create ./inc/poche/myconfig.inc.php'); + die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.'); + } - if (version_compare(POCHE_VERSION, '1.0-beta3') == 1) { - # $myconfig_file is only created with poche > 1.0-beta3 - # in 1.0-beta3, the update script creates $myconfig_file - - if (!is_writable('./inc/poche/')) { - self::logm('you don\'t have write access to create ./inc/poche/myconfig.inc.php'); - die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.'); - } - - if (!file_exists($myconfig_file)) - { - $fp = fopen($myconfig_file, 'w'); - fwrite($fp, ' Date: Fri, 23 Aug 2013 22:43:16 +0200 Subject: preparing to beta4 --- inc/poche/Tools.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/poche/Tools.class.php') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 52d0f2d5..8661ab6e 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -238,7 +238,7 @@ class Tools public static function createMyConfig() { $myconfig_file = './inc/poche/myconfig.inc.php'; - + if (!is_writable('./inc/poche/')) { self::logm('you don\'t have write access to create ./inc/poche/myconfig.inc.php'); die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.'); @@ -248,7 +248,7 @@ class Tools { $fp = fopen($myconfig_file, 'w'); fwrite($fp, ' 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