mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
- check if new file is identical to current version
This commit is contained in:
parent
129cf43e1a
commit
ec90ee5a09
|
@ -80,6 +80,12 @@ if ($_FILES['userfile']['error'] == 0) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("uploading_failed"));
|
||||
}
|
||||
|
||||
/* Check if the uploaded file is identical to last version */
|
||||
$lc = $document->getLatestContent();
|
||||
if($lc->getChecksum() == LetoDMS_Core_File::checksum($userfiletmp)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("identical_version"));
|
||||
}
|
||||
|
||||
$lastDotIndex = strrpos(basename($userfilename), ".");
|
||||
if (is_bool($lastDotIndex) && !$lastDotIndex)
|
||||
$fileType = ".";
|
||||
|
|
Loading…
Reference in New Issue
Block a user