mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
- check if expiritation is set before doing any action
This commit is contained in:
parent
d9f83a155d
commit
acaaac7b69
|
@ -168,7 +168,8 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["si
|
||||||
|
|
||||||
$expires = ($_POST["expires"] == "true") ? mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]) : false;
|
$expires = ($_POST["expires"] == "true") ? mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]) : false;
|
||||||
|
|
||||||
if ($document->setExpires($expires)) {
|
if ($expires) {
|
||||||
|
if($document->setExpires($expires)) {
|
||||||
$document->getNotifyList();
|
$document->getNotifyList();
|
||||||
if($notifier) {
|
if($notifier) {
|
||||||
$folder = $document->getFolder();
|
$folder = $document->getFolder();
|
||||||
|
@ -181,8 +182,8 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["si
|
||||||
getMLText("comment").": ".$document->getComment()."\r\n".
|
getMLText("comment").": ".$document->getComment()."\r\n".
|
||||||
"URL: ###URL_PREFIX###out/out.ViewDocument.php?documentid=".$document->_id."\r\n";
|
"URL: ###URL_PREFIX###out/out.ViewDocument.php?documentid=".$document->_id."\r\n";
|
||||||
|
|
||||||
// $subject=mydmsDecodeString($subject);
|
// $subject=mydmsDecodeString($subject);
|
||||||
// $message=mydmsDecodeString($message);
|
// $message=mydmsDecodeString($message);
|
||||||
|
|
||||||
$notifier->toList($user, $document->_notifyList["users"], $subject, $message);
|
$notifier->toList($user, $document->_notifyList["users"], $subject, $message);
|
||||||
foreach ($document->_notifyList["groups"] as $grp) {
|
foreach ($document->_notifyList["groups"] as $grp) {
|
||||||
|
@ -193,6 +194,7 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["si
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user