mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
use new method getRealChecksum() and getRealMimeType()
This commit is contained in:
parent
a7e9172557
commit
13d9717f74
|
@ -343,7 +343,7 @@ $(document).ready( function() {
|
||||||
if($file->getName() != $file->getOriginalFileName())
|
if($file->getName() != $file->getOriginalFileName())
|
||||||
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
|
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
|
||||||
if ($file_exists) {
|
if ($file_exists) {
|
||||||
$realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $file->getPath());
|
$realmimetype = $file->getRealMimeType();
|
||||||
print "<li>".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())."</li>";
|
print "<li>".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())."</li>";
|
||||||
} else print "<li>".htmlspecialchars($file->getMimeType())." - <span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
} else print "<li>".htmlspecialchars($file->getMimeType())." - <span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
||||||
|
|
||||||
|
@ -747,7 +747,7 @@ $(document).ready( function() {
|
||||||
print "<li>". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ";
|
print "<li>". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ";
|
||||||
print htmlspecialchars($latestContent->getMimeType());
|
print htmlspecialchars($latestContent->getMimeType());
|
||||||
if($user->isAdmin()) {
|
if($user->isAdmin()) {
|
||||||
$realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $latestContent->getPath());
|
$realmimetype = $latestContent->getRealMimeType();
|
||||||
if($realmimetype != $latestContent->getMimeType())
|
if($realmimetype != $latestContent->getMimeType())
|
||||||
echo " <i class=\"fa fa-exclamation-triangle ajax-click\" data-param1=\"command=setmimetype\" data-param2=\"contentid=".$latestContent->getId()."\" data-param3=\"formtoken=".createFormKey('setmimetype')."\" title=\"".htmlspecialchars($realmimetype)."\"></i> ";
|
echo " <i class=\"fa fa-exclamation-triangle ajax-click\" data-param1=\"command=setmimetype\" data-param2=\"contentid=".$latestContent->getId()."\" data-param3=\"formtoken=".createFormKey('setmimetype')."\" title=\"".htmlspecialchars($realmimetype)."\"></i> ";
|
||||||
}
|
}
|
||||||
|
@ -1012,7 +1012,7 @@ $(document).ready( function() {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$checksum = SeedDMS_Core_File::checksum($dms->contentDir.$latestContent->getPath());
|
$checksum = $latestContent->getRealChecksum($latestContent);
|
||||||
if($checksum != $latestContent->getChecksum()) {
|
if($checksum != $latestContent->getChecksum()) {
|
||||||
$this->errorMsg(getMLText('wrong_checksum'));
|
$this->errorMsg(getMLText('wrong_checksum'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user