mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
use new method getMaximumUploadSize()
This commit is contained in:
parent
9d2dd94662
commit
af6f48db48
|
@ -148,7 +148,7 @@ class UI extends UI_Default {
|
|||
$view->setParam('enablesessionlist', $settings->_enableSessionList);
|
||||
$view->setParam('workflowmode', $settings->_workflowMode);
|
||||
$view->setParam('partitionsize', SeedDMS_Core_File::parse_filesize( $settings->_partitionSize));
|
||||
$view->setParam('maxuploadsize', SeedDMS_Core_File::parse_filesize($settings->_maxUploadSize));
|
||||
$view->setParam('maxuploadsize', $settings->getMaximumUploadSize());
|
||||
$view->setParam('showmissingtranslations', $settings->_showMissingTranslations);
|
||||
$view->setParam('defaultsearchmethod', $settings->_defaultSearchMethod);
|
||||
$view->setParam('cachedir', $settings->_cacheDir);
|
||||
|
|
|
@ -172,11 +172,7 @@ console.log(params);
|
|||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
|
||||
|
||||
$mus2 = SeedDMS_Core_File::parse_filesize(ini_get("upload_max_filesize"));
|
||||
if($maxuploadsize && $maxuploadsize < $mus2)
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($maxuploadsize);
|
||||
else
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($mus2);
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($maxuploadsize);
|
||||
$this->warningMsg($msg);
|
||||
$this->contentHeading(getMLText("add_document"));
|
||||
|
||||
|
|
|
@ -126,11 +126,7 @@ $(document).ready( function() {
|
|||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
$this->contentHeading(getMLText("linked_files"));
|
||||
$mus2 = SeedDMS_Core_File::parse_filesize(ini_get("upload_max_filesize"));
|
||||
if($maxuploadsize && $maxuploadsize < $mus2)
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($maxuploadsize);
|
||||
else
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($mus2);
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($maxuploadsize);
|
||||
$this->warningMsg($msg);
|
||||
|
||||
?>
|
||||
|
|
|
@ -194,26 +194,8 @@ console.log(element);
|
|||
}
|
||||
}
|
||||
|
||||
if($enablelargefileupload) {
|
||||
if($maxuploadsize) {
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($maxuploadsize);
|
||||
} else {
|
||||
$msg = '';
|
||||
}
|
||||
} else {
|
||||
$msg = getMLText("max_upload_size").": ".ini_get( "upload_max_filesize");
|
||||
}
|
||||
$mus2 = SeedDMS_Core_File::parse_filesize(ini_get("upload_max_filesize"));
|
||||
if($maxuploadsize && $maxuploadsize < $mus2)
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($maxuploadsize);
|
||||
else
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($mus2);
|
||||
|
||||
if(0 && $enablelargefileupload) {
|
||||
$msg .= "<p>".sprintf(getMLText('link_alt_updatedocument'), "out.AddMultiDocument.php?folderid=".$folder->getID()."&showtree=".showtree())."</p>";
|
||||
}
|
||||
if($msg)
|
||||
$this->warningMsg($msg);
|
||||
$msg = getMLText("max_upload_size").": ".SeedDMS_Core_File::format_filesize($maxuploadsize);
|
||||
$this->warningMsg($msg);
|
||||
?>
|
||||
|
||||
<form class="form-horizontal" action="../op/op.UpdateDocument.php" enctype="multipart/form-data" method="post" name="form1" id="form1">
|
||||
|
|
|
@ -204,11 +204,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
echo "SeedDMSUpload.setUrl('".$this->params['settings']->_httpRoot."op/op.Ajax.php');";
|
||||
echo "SeedDMSUpload.setAbortBtnLabel('".getMLText("cancel")."');";
|
||||
echo "SeedDMSUpload.setEditBtnLabel('');";
|
||||
$mus2 = SeedDMS_Core_File::parse_filesize(ini_get("upload_max_filesize"));
|
||||
if($maxuploadsize && $maxuploadsize < $mus2)
|
||||
echo "SeedDMSUpload.setMaxFileSize($maxuploadsize);\n";
|
||||
else
|
||||
echo "SeedDMSUpload.setMaxFileSize($mus2);\n";
|
||||
echo "SeedDMSUpload.setMaxFileSize($maxuploadsize);\n";
|
||||
echo "SeedDMSUpload.setMaxFileSizeMsg('".getMLText("uploading_maxsize")."');";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -470,11 +470,12 @@ $('body').on('click', '.order-btn', function(ev) {
|
|||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$folder = $this->params['folder'];
|
||||
$maxuploadsize = $this->params['maxuploadsize'];
|
||||
|
||||
$this->contentHeading(getMLText("dropupload"), true);
|
||||
if ($folder->getAccessMode($user) >= M_READWRITE) {
|
||||
?>
|
||||
<div id="draganddrophandler" class="well alert alert-warning" data-droptarget="folder_<?php echo $folder->getID(); ?>" data-target="<?php echo $folder->getID(); ?>" data-uploadformtoken="<?php echo createFormKey(''); ?>"><?php printMLText('drop_files_here'); ?></div>
|
||||
<div id="draganddrophandler" class="well alert alert-warning" data-droptarget="folder_<?php echo $folder->getID(); ?>" data-target="<?php echo $folder->getID(); ?>" data-uploadformtoken="<?php echo createFormKey(''); ?>"><?php printMLText('drop_files_here', ['maxuploadsize'=>SeedDMS_Core_File::format_filesize($maxuploadsize)]); ?></div>
|
||||
<?php
|
||||
} else {
|
||||
$this->errorMsg(getMLText('access_denied'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user