Permalink
Browse files

ApplicationState::detectServerURL : add parameter to skip admin confi…

…g (= external url) and only use "internal" url.
  • Loading branch information...
1 parent 8fcaf96 commit 4a055dd8dab070da9a0a80b8bed02a8c8c8ee173 @cdujeu cdujeu committed Aug 30, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 core/src/core/src/pydio/Core/Utils/ApplicationState.php
@@ -100,14 +100,15 @@ public static function getTravelPath($from, $to)
/**
* Build the current server URL
- * @param bool $withURI
+ * @param bool $withURI Wether to return the "path" part in scheme://host[/path]
+ * @param bool $forceInternal Wether to force server local IP detection, or to use external URL if it is set in the configuration
* @static
* @return string
*/
- public static function detectServerURL($withURI = false)
+ public static function detectServerURL($withURI = false, $forceInternal = false)
{
$setUrl = ConfService::getGlobalConf("SERVER_URL");
- if (!empty($setUrl)) {
+ if (!empty($setUrl) && !$forceInternal) {
return (string)$setUrl;
}
if (php_sapi_name() == "cli") {

0 comments on commit 4a055dd

Please sign in to comment.