Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
ApplicationState::detectServerURL : add parameter to skip admin confi…
Browse files Browse the repository at this point in the history
…g (= external url) and only use "internal" url.
  • Loading branch information
cdujeu committed Aug 30, 2016
1 parent 8fcaf96 commit 4a055dd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/core/src/pydio/Core/Utils/ApplicationState.php
Expand Up @@ -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") {
Expand Down

0 comments on commit 4a055dd

Please sign in to comment.