- check for _enableLargeFileUpload and disable links if not set

This commit is contained in:
steinm 2011-10-25 13:37:26 +00:00
parent 8215cd7590
commit 9177ba39eb
3 changed files with 14 additions and 0 deletions

View File

@ -93,9 +93,15 @@ $docAccess = $folder->getApproversList();
<tr>
<td class="warning"><?php echo getMLText("max_upload_size")." : ".ini_get( "upload_max_filesize"); ?></td>
</tr>
<?php
if($settings->_enableLargeFileUpload) {
?>
<tr>
<td><?php printf(getMLText('link_alt_updatedocument'), "out.AddMultiDocument.php?folderid=".$folderid."&showtree=".showtree()); ?></td>
</tr>
<?php
}
?>
</table><br>
<form action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();">

View File

@ -25,6 +25,10 @@ include("../inc/inc.Language.php");
include("../inc/inc.ClassUI.php");
include("../inc/inc.Authentication.php");
if(!$settings->_enableLargeFileUpload) {
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("access_denied"));
}
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id"));
}

View File

@ -29,6 +29,10 @@ include("../inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
}
if(!$settings->_enableLargeFileUpload) {
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("access_denied"));
}
$documentid = $_GET["documentid"];
$document = $dms->getDocument($documentid);