aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Tools.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-xinc/poche/Tools.class.php14
1 files changed, 0 insertions, 14 deletions
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
214 return ((isset ($_REQUEST["$var"])) ? htmlentities($_REQUEST["$var"]) : $default); 214 return ((isset ($_REQUEST["$var"])) ? htmlentities($_REQUEST["$var"]) : $default);
215 } 215 }
216 216
217 public static function getDomain($url)
218 {
219 return parse_url($url, PHP_URL_HOST);
220 }
221
222 public static function getReadingTime($text) {
223 $word = str_word_count(strip_tags($text));
224 $minutes = floor($word / 200);
225 $seconds = floor($word % 200 / (200 / 60));
226 $time = array('minutes' => $minutes, 'seconds' => $seconds);
227
228 return $minutes;
229 }
230
231 public static function getDocLanguage($userlanguage) { 217 public static function getDocLanguage($userlanguage) {
232 $lang = explode('.', $userlanguage); 218 $lang = explode('.', $userlanguage);
233 return str_replace('_', '-', $lang[0]); 219 return str_replace('_', '-', $lang[0]);