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

Commit

Permalink
Fix legacy Private Minisite
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Aug 7, 2014
1 parent c0a4a63 commit 387a61c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -960,10 +960,12 @@ public static function loadMinisite($data, $hash = '')
if (!empty($data["PRELOG_USER"])) {
AuthService::logUser($data["PRELOG_USER"], "", true);
$html = str_replace("AJXP_PRELOGED_USER", "ajxp_preloged_user", $html);
} else {
} else if(isSet($data["PRESET_LOGIN"])) {
$_SESSION["PENDING_REPOSITORY_ID"] = $repository;
$_SESSION["PENDING_FOLDER"] = "/";
$html = str_replace("AJXP_PRELOGED_USER", $data["PRESET_LOGIN"], $html);
} else{
$html = str_replace("AJXP_PRELOGED_USER", "ajxp_legacy_minisite", $html);
}
if(isSet($hash)){
$_SESSION["CURRENT_MINISITE"] = $hash;
Expand Down
4 changes: 4 additions & 0 deletions core/src/plugins/action.share/res/minisite.php
Expand Up @@ -129,6 +129,10 @@
"PASSWORD_AUTH_ONLY":true,
"SERVER_PERMANENT_PARAMS":"minisite_session=AJXP_LINK_HASH"
};
if(startParameters["PRESET_LOGIN"] == "ajxp_legacy_minisite"){
delete startParameters["PRESET_LOGIN"];
startParameters["PASSWORD_AUTH_ONLY"] = false;
}
document.observe("ajaxplorer:before_gui_load", function(e){
ajaxplorer.currentThemeUsesIconFonts = true;
document.documentElement.className += " ajxp_theme_AJXP_THEME";
Expand Down

0 comments on commit 387a61c

Please sign in to comment.