diff options
author | Valérian Saliou <valerian@valeriansaliou.name> | 2014-01-29 15:29:35 +0400 |
---|---|---|
committer | Valérian Saliou <valerian@valeriansaliou.name> | 2014-01-29 15:29:35 +0400 |
commit | a2abf6e6f26a948905293a77decf5bc359ffc7a1 (patch) | |
tree | c0162d1e08e707636c21585470761f46a2bf53fc /server | |
parent | 97da93dd8ea98497b000424fe79749432e92b319 (diff) |
fixes #405
Diffstat (limited to 'server')
-rw-r--r-- | server/functions.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/functions.php b/server/functions.php index 24de62f1..95ac3179 100644 --- a/server/functions.php +++ b/server/functions.php @@ -628,7 +628,11 @@ function normalizeFileType($type) { function getFiles($h, $l, $t, $g, $f) { // Define the good path to the Get API - $path_to = hasStatic() ? HOST_STATIC.'/' : JAPPIX_BASE.'/'; + if(isStaticURL()) { + $path_to = staticLocation(); + } else { + $path_to = hasStatic() ? HOST_STATIC.'/' : JAPPIX_BASE.'/'; + } if(!multiFiles()) { $values = array(); @@ -766,6 +770,11 @@ function sslLink() { } // The function to get the Jappix static URL +function isStaticURL() { + return preg_match('/((.+)\/)(server|php)\/get\.php(\S)+$/', staticURL()) && true; +} + +// The function to get the Jappix static URL function staticURL() { if(hasStatic()) { // Static URL in hosts.xml |