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

Commit

Permalink
Use HTML base tag instead of the previous complicated "travel_path_to…
Browse files Browse the repository at this point in the history
…_root" mechanism...
  • Loading branch information
cdujeu committed Nov 16, 2013
1 parent fcf1a80 commit ef66405
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
9 changes: 7 additions & 2 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -755,7 +755,11 @@ public static function loadMinisite($data)
}
}

$tPath = (!empty($data["TRAVEL_PATH_TO_ROOT"]) ? $data["TRAVEL_PATH_TO_ROOT"] : "../..");
if(!empty($data["AJXP_APPLICATION_BASE"])){
$tPath = $data["AJXP_APPLICATION_BASE"];
}else{
$tPath = (!empty($data["TRAVEL_PATH_TO_ROOT"]) ? $data["TRAVEL_PATH_TO_ROOT"] : "../..");
}
$html = str_replace("AJXP_PATH_TO_ROOT", $tPath, $html);
HTMLWriter::internetExplorerMainDocumentHeader();
HTMLWriter::charsetHeader();
Expand Down Expand Up @@ -1021,7 +1025,8 @@ public function createSharedMinisite($httpVars, $repository, $accessDriver)
if ($httpVars["disable_download"]) {
$data["DOWNLOAD_DISABLED"] = true;
}
$data["TRAVEL_PATH_TO_ROOT"] = $this->computeMinisiteToServerURL();
//$data["TRAVEL_PATH_TO_ROOT"] = $this->computeMinisiteToServerURL();
$data["AJXP_APPLICATION_BASE"] = AJXP_Utils::detectServerURL();

$outputData = serialize($data);
$hash = self::computeHash($outputData, $downloadFolder);
Expand Down
17 changes: 9 additions & 8 deletions core/src/plugins/action.share/res/minisite.php
Expand Up @@ -2,12 +2,13 @@
<html xmlns:ajxp>
<head>
<title>Pydio</title>
<base href="AJXP_PATH_TO_ROOT"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="icon" type="image/x-png" href="AJXP_PATH_TO_ROOT/plugins/gui.ajax/res/themes/vision/images/html-folder.png">
<link rel="stylesheet" type="text/css" href="AJXP_PATH_TO_ROOT/plugins/gui.ajax/res/themes/vision/css/allz.css">
<link rel="stylesheet" href="AJXP_PATH_TO_ROOT/plugins/gui.ajax/res/themes/vision/css/font-awesome.css"/>
<link rel="stylesheet" href="AJXP_PATH_TO_ROOT/plugins/gui.ajax/res/themes/vision/css/media.css"/>
<link rel="icon" type="image/x-png" href="plugins/gui.ajax/res/themes/vision/images/html-folder.png">
<link rel="stylesheet" type="text/css" href="plugins/gui.ajax/res/themes/vision/css/allz.css">
<link rel="stylesheet" href="plugins/gui.ajax/res/themes/vision/css/font-awesome.css"/>
<link rel="stylesheet" href="plugins/gui.ajax/res/themes/vision/css/media.css"/>
<style type="text/css">
#widget_title{
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
Expand All @@ -28,7 +29,7 @@
}
.widget_logo {
background-image: url('AJXP_PATH_TO_ROOT/plugins/gui.ajax/PydioLogo250.png');
background-image: url('plugins/gui.ajax/PydioLogo250.png');
background-repeat: no-repeat;
background-position: right 5px;
background-size: 170px;
Expand Down Expand Up @@ -115,14 +116,14 @@
display: none;
}
</style>
<script language="javascript" type="text/javascript" src="AJXP_PATH_TO_ROOT/plugins/gui.ajax/res/js/ajaxplorer_boot.js"></script>
<script language="javascript" type="text/javascript" src="plugins/gui.ajax/res/js/ajaxplorer_boot.js"></script>
<script type="text/javascript">
var ajaxplorer, MessageHash={};
var startParameters = {
"BOOTER_URL":"AJXP_PATH_TO_ROOT/index_shared.php?get_action=get_boot_conf&goto=AJXP_START_REPOSITORY&minisite_session=true",
"BOOTER_URL":"index_shared.php?get_action=get_boot_conf&goto=AJXP_START_REPOSITORY&minisite_session=true",
"EXT_REP":"\/",
"MAIN_ELEMENT":"ajxp_shared_folder",
"SERVER_PREFIX_URI": "AJXP_PATH_TO_ROOT/"
"SERVER_PREFIX_URI": ""
};
document.observe("ajaxplorer:before_gui_load", function(e){
ajaxplorer.currentThemeUsesIconFonts = true;
Expand Down

0 comments on commit ef66405

Please sign in to comment.