aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Tools.class.php
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-06-07 16:36:57 +0200
committertcit <tcit@tcit.fr>2014-06-07 16:36:57 +0200
commit35d4e27588d3e7a6ace1f6b101d909f1eceafac9 (patch)
treef070a9789d6c125a0c1141e385b59cf0a42247e6 /inc/poche/Tools.class.php
parentec15d0a784a84e07b284c76e71fd8496e00559d5 (diff)
parentc93a5c137fcabcf771e7bd2d16d3b8d819de16da (diff)
downloadwallabag-35d4e27588d3e7a6ace1f6b101d909f1eceafac9.tar.gz
wallabag-35d4e27588d3e7a6ace1f6b101d909f1eceafac9.tar.zst
wallabag-35d4e27588d3e7a6ace1f6b101d909f1eceafac9.zip
up to date
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-xinc/poche/Tools.class.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 7f064020..1ef875c9 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -18,8 +18,6 @@ class Tools
18 die(_('Oops, it seems you don\'t have PHP 5.')); 18 die(_('Oops, it seems you don\'t have PHP 5.'));
19 } 19 }
20 20
21 error_reporting(E_ALL);
22
23 function stripslashesDeep($value) { 21 function stripslashesDeep($value) {
24 return is_array($value) 22 return is_array($value)
25 ? array_map('stripslashesDeep', $value) 23 ? array_map('stripslashesDeep', $value)
@@ -60,7 +58,11 @@ class Tools
60 } 58 }
61 59
62 $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'])); 60 $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']));
63 61
62 if (strpos($host, ':') !== false) {
63 $serverport = '';
64 }
65
64 return 'http' . ($https ? 's' : '') . '://' 66 return 'http' . ($https ? 's' : '') . '://'
65 . $host . $serverport . $scriptname; 67 . $host . $serverport . $scriptname;
66 } 68 }