diff options
author | Carsten Ringe <carsten@kopis.de> | 2015-06-09 19:51:01 +0200 |
---|---|---|
committer | Carsten Ringe <carsten@kopis.de> | 2015-06-09 19:51:01 +0200 |
commit | 6e22fc17d2df7f7c3636b9064c4016fefb88e7f9 (patch) | |
tree | d76fc59a1364c5831556a45d0044b5975e78ce39 /inc/poche/Tools.class.php | |
parent | 7d6bd5670e8743e10c52b745142320a47d0f1cbe (diff) | |
download | wallabag-6e22fc17d2df7f7c3636b9064c4016fefb88e7f9.tar.gz wallabag-6e22fc17d2df7f7c3636b9064c4016fefb88e7f9.tar.zst wallabag-6e22fc17d2df7f7c3636b9064c4016fefb88e7f9.zip |
Use config option BASE_URL in getPocheUrl()
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-x | inc/poche/Tools.class.php | 10 |
1 files changed, 8 insertions, 2 deletions
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 | |||
72 | $serverport = ''; | 72 | $serverport = ''; |
73 | } | 73 | } |
74 | 74 | ||
75 | return 'http' . ($https ? 's' : '') . '://' | 75 | // check if BASE_URL is configured |
76 | . $host . $serverport . $scriptname; | 76 | if(BASE_URL != null && BASE_URL != '') { |
77 | $baseUrl = BASE_URL; | ||
78 | } else { | ||
79 | $baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport; | ||
80 | } | ||
81 | |||
82 | return $baseUrl . $scriptname; | ||
77 | } | 83 | } |
78 | 84 | ||
79 | /** | 85 | /** |