From 6e22fc17d2df7f7c3636b9064c4016fefb88e7f9 Mon Sep 17 00:00:00 2001 From: Carsten Ringe Date: Tue, 9 Jun 2015 19:51:01 +0200 Subject: Use config option BASE_URL in getPocheUrl() --- inc/poche/Tools.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index d0b31d4f..d3dddd3b 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -72,8 +72,14 @@ final class Tools $serverport = ''; } - return 'http' . ($https ? 's' : '') . '://' - . $host . $serverport . $scriptname; + // check if BASE_URL is configured + if(BASE_URL != null && BASE_URL != '') { + $baseUrl = BASE_URL; + } else { + $baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport; + } + + return $baseUrl . $scriptname; } /** -- cgit v1.2.3