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

Commit

Permalink
Revert previous change, we already had the display_upgrade_note action.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 7, 2016
1 parent dbaf217 commit 6da3f27
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions core/src/plugins/action.updater/class.UpdateController.php
Expand Up @@ -85,25 +85,8 @@ public function switchAction($action, $httpVars, $fileVars)

case "get_upgrade_path":

if(isSet($httpVars["proxy_note"])){
$latestNote = $_SESSION["pydio-upgrade-latest-note"];
if(!empty($latestNote)){
$html = file_get_contents($latestNote, null, AjaXplorerUpgrader::getContext());
header("Content-type: text/html");
echo $html;
return;
}
}
header("Content-type: application/json");
$jsonString = AjaXplorerUpgrader::getUpgradePath($this->pluginConf["UPDATE_SITE"], "json", $this->pluginConf["UPDATE_CHANNEL"]);
$data = json_decode($jsonString, true);
if(!empty($this->pluginConf["UPDATE_SITE_USER"]) && isSet($data["latest_note"]) && strpos($data["latest_note"], $this->pluginConf["UPDATE_SITE"]) === 0 && ConfService::$useSession){
$_SESSION["pydio-upgrade-latest-note"] = $data["latest_note"];
$data["latest_note"] = rtrim(AJXP_Utils::detectServerURL(true), "/")."/?get_action=get_upgrade_path&proxy_note=true&secure_token=".$httpVars["secure_token"];
echo json_encode($data);
}else{
echo $jsonString;
}
print AjaXplorerUpgrader::getUpgradePath($this->pluginConf["UPDATE_SITE"], "json", $this->pluginConf["UPDATE_CHANNEL"]);

break;

Expand Down

0 comments on commit 6da3f27

Please sign in to comment.