From 752cd4a8ef7bbc8ebd6c481ed890e0d8e46819a8 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Mon, 2 Jun 2014 18:00:09 +0300 Subject: error reporting level set in E_ALL & ~E_NOTICE by default, can be overriden in config --- inc/poche/Tools.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'inc/poche/Tools.class.php') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 8073a3fe..1ef875c9 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -18,8 +18,6 @@ class Tools die(_('Oops, it seems you don\'t have PHP 5.')); } - error_reporting(E_ALL); - function stripslashesDeep($value) { return is_array($value) ? array_map('stripslashesDeep', $value) @@ -64,7 +62,7 @@ class Tools if (strpos($host, ':') !== false) { $serverport = ''; } - + return 'http' . ($https ? 's' : '') . '://' . $host . $serverport . $scriptname; } -- cgit v1.2.3 From 5425b0dd82863d548f49dcbd81636ed8dabd7866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 8 Jul 2014 21:46:32 +0200 Subject: new fields in database, reading time / date and domain name are stored --- inc/poche/Tools.class.php | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'inc/poche/Tools.class.php') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 1ef875c9..13f48903 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -214,20 +214,6 @@ class Tools return ((isset ($_REQUEST["$var"])) ? htmlentities($_REQUEST["$var"]) : $default); } - public static function getDomain($url) - { - return parse_url($url, PHP_URL_HOST); - } - - public static function getReadingTime($text) { - $word = str_word_count(strip_tags($text)); - $minutes = floor($word / 200); - $seconds = floor($word % 200 / (200 / 60)); - $time = array('minutes' => $minutes, 'seconds' => $seconds); - - return $minutes; - } - public static function getDocLanguage($userlanguage) { $lang = explode('.', $userlanguage); return str_replace('_', '-', $lang[0]); -- cgit v1.2.3 From 6400371ff93782d25cdbd50aa224c70145b3890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 10 Jul 2014 13:17:04 +0200 Subject: I removed my previous commit. We have to create a new branch for that. --- inc/poche/Tools.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'inc/poche/Tools.class.php') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 13f48903..cc01f403 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -214,6 +214,20 @@ class Tools return ((isset ($_REQUEST["$var"])) ? htmlentities($_REQUEST["$var"]) : $default); } + public static function getDomain($url) + { + return parse_url($url, PHP_URL_HOST); + } + + public static function getReadingTime($text) { + $word = str_word_count(strip_tags($text)); + $minutes = floor($word / 200); + $seconds = floor($word % 200 / (200 / 60)); + $time = array('minutes' => $minutes, 'seconds' => $seconds); + + return $minutes; + } + public static function getDocLanguage($userlanguage) { $lang = explode('.', $userlanguage); return str_replace('_', '-', $lang[0]); -- cgit v1.2.3