mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
getMimeType() is now SeedDMS_Core_File::mimetype()
This commit is contained in:
parent
2c96fb5a1c
commit
820370d713
|
@ -665,7 +665,7 @@ switch($command) {
|
|||
if($content) {
|
||||
$document = $content->getDocument();
|
||||
if ($document->getAccessMode($user) >= M_READWRITE) {
|
||||
$realmimetype = getMimeType($dms->contentDir . $content->getPath());
|
||||
$realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $content->getPath());
|
||||
if (!$content->setMimeType($realmimetype)) {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));
|
||||
|
|
|
@ -346,7 +346,7 @@ $(document).ready( function() {
|
|||
if($file->getName() != $file->getOriginalFileName())
|
||||
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
|
||||
if ($file_exists) {
|
||||
$realmimetype = getMimeType($dms->contentDir . $file->getPath());
|
||||
$realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $file->getPath());
|
||||
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>";
|
||||
|
||||
|
@ -738,7 +738,7 @@ $(document).ready( function() {
|
|||
print "<li>". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ";
|
||||
print htmlspecialchars($latestContent->getMimeType());
|
||||
if($user->isAdmin()) {
|
||||
$realmimetype = getMimeType($dms->contentDir . $latestContent->getPath());
|
||||
$realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $latestContent->getPath());
|
||||
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> ";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user