]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Use config option BASE_URL in getPocheUrl() 1214/head
authorCarsten Ringe <carsten@kopis.de>
Tue, 9 Jun 2015 17:51:01 +0000 (19:51 +0200)
committerCarsten Ringe <carsten@kopis.de>
Tue, 9 Jun 2015 17:51:01 +0000 (19:51 +0200)
inc/poche/Tools.class.php

index d0b31d4f15648dbe70e9f507c921b3f0cc493183..d3dddd3ba32421515648d97e86472d785a7ee714 100755 (executable)
@@ -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;
     }
 
     /**