aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Tools.class.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-06-29 15:52:55 +0200
committerThomas Citharel <tcit@tcit.fr>2015-06-29 15:52:55 +0200
commit984805649e38c0fc83cde0345ac99b74c8b66e61 (patch)
tree0b9c585a9ab489e38e6c3b3d9195036a3a485e75 /inc/poche/Tools.class.php
parenta754e1c3f07883bbdb1ed8abddecfc3c833de785 (diff)
downloadwallabag-984805649e38c0fc83cde0345ac99b74c8b66e61.tar.gz
wallabag-984805649e38c0fc83cde0345ac99b74c8b66e61.tar.zst
wallabag-984805649e38c0fc83cde0345ac99b74c8b66e61.zip
fix BASE_URL
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-xinc/poche/Tools.class.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 15050aed..6c176eae 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -40,6 +40,8 @@ final class Tools
40 */ 40 */
41 public static function getPocheUrl() 41 public static function getPocheUrl()
42 { 42 {
43 $baseUrl = "";
44
43 $https = (!empty($_SERVER['HTTPS']) 45 $https = (!empty($_SERVER['HTTPS'])
44 && (strtolower($_SERVER['HTTPS']) == 'on')) 46 && (strtolower($_SERVER['HTTPS']) == 'on'))
45 || (isset($_SERVER["SERVER_PORT"]) 47 || (isset($_SERVER["SERVER_PORT"])
@@ -72,14 +74,16 @@ final class Tools
72 $serverport = ''; 74 $serverport = '';
73 } 75 }
74 76
75 // check if BASE_URL is configured 77 // check if BASE_URL is configured
76 if(BASE_URL != null && BASE_URL != '') { 78 if(BASE_URL) {
77 $baseUrl = BASE_URL; 79 print_r(BASE_URL);
78 } else { 80 $baseUrl = BASE_URL;
79 $baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport; 81 } else {
80 } 82 $baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport;
83 }
81 84
82 return $baseUrl . $scriptname; 85 return $baseUrl . $scriptname;
86
83 } 87 }
84 88
85 /** 89 /**