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

Commit

Permalink
[action.share] Reset max download and max expiration time Fix #1004
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Dec 2, 2015
1 parent 85b7754 commit 25a8d3d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -1592,11 +1592,19 @@ public function createSharedMinisite($httpVars, $repository, $accessDriver)
if(isSet($httpVars["minisite_layout"])){
$data["AJXP_TEMPLATE_NAME"] = $httpVars["minisite_layout"];
}
if(isSet($httpVars["expiration"]) && intval($httpVars["expiration"]) > 0){
$data["EXPIRE_TIME"] = time() + intval($httpVars["expiration"]) * 86400;
if(isSet($httpVars["expiration"])){
if(intval($httpVars["expiration"]) > 0){
$data["EXPIRE_TIME"] = time() + intval($httpVars["expiration"]) * 86400;
}else if(isSet($data["EXPIRE_TIME"])) {
unset($data["EXPIRE_TIME"]);
}
}
if(isSet($httpVars["downloadlimit"]) && intval($httpVars["downloadlimit"]) > 0){
$data["DOWNLOAD_LIMIT"] = intval($httpVars["downloadlimit"]);
if(isSet($httpVars["downloadlimit"])){
if(intval($httpVars["downloadlimit"]) > 0){
$data["DOWNLOAD_LIMIT"] = intval($httpVars["downloadlimit"]);
}else if(isSet($data["DOWNLOAD_LIMIT"])){
unset($data["DOWNLOAD_LIMIT"]);
}
}
if(AuthService::usersEnabled()){
$data["OWNER_ID"] = AuthService::getLoggedUser()->getId();
Expand Down

0 comments on commit 25a8d3d

Please sign in to comment.