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

Commit

Permalink
Compute default path_to_root based on PUBLIC_BASEURI, that must be se…
Browse files Browse the repository at this point in the history
…t anyway.
  • Loading branch information
cdujeu committed Sep 9, 2016
1 parent f76b734 commit b9a48a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/plugins/action.share/src/View/MinisiteRenderer.php
Expand Up @@ -237,7 +237,11 @@ public static function writeHtml(ResponseInterface $responseInterface, ContextIn
if (!empty($data["AJXP_APPLICATION_BASE"])) {
$tPath = $data["AJXP_APPLICATION_BASE"];
} else {
$tPath = (!empty($data["TRAVEL_PATH_TO_ROOT"]) ? $data["TRAVEL_PATH_TO_ROOT"] : "../..");
// Replace base uri by .. : /path/to/uri should give ../../..
$defaultTPath = implode("/", array_map(function ($v) {
return "..";
}, explode("/", trim(ConfService::getGlobalConf("PUBLIC_BASEURI"), "/"))));
$tPath = (!empty($data["TRAVEL_PATH_TO_ROOT"]) ? $data["TRAVEL_PATH_TO_ROOT"] : $defaultTPath);
}

$serverBaseUrl = ApplicationState::detectServerURL(true);
Expand Down

0 comments on commit b9a48a5

Please sign in to comment.