mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +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) {
|
if($content) {
|
||||||
$document = $content->getDocument();
|
$document = $content->getDocument();
|
||||||
if ($document->getAccessMode($user) >= M_READWRITE) {
|
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)) {
|
if (!$content->setMimeType($realmimetype)) {
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));
|
echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));
|
||||||
|
|
|
@ -346,7 +346,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 = 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>";
|
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>";
|
||||||
|
|
||||||
|
@ -738,7 +738,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 = getMimeType($dms->contentDir . $latestContent->getPath());
|
$realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $latestContent->getPath());
|
||||||
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> ";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user