check for more mimetypes in getWrongFiletypeDocumentContent()

This commit is contained in:
Uwe Steinmann 2023-01-19 08:59:49 +01:00
parent 1506cef2ab
commit fb43a82818

View File

@ -3957,7 +3957,7 @@ class SeedDMS_Core_DMS {
* @return bool|SeedDMS_Core_Document[]
*/
function getWrongFiletypeDocumentContent() { /* {{{ */
$queryStr = "SELECT * FROM `tblDocumentContent` WHERE `mimeType` in ('application/pdf', 'image/png', 'image/gif', 'image/jpg')";
$queryStr = "SELECT * FROM `tblDocumentContent` WHERE `mimeType` in ('application/zip', 'application/pdf', 'image/png', 'image/gif', 'image/jpg', 'audio/mp3', 'text/rtf')";
$resArr = $this->db->getResultArray($queryStr);
if ($resArr === false)
return false;
@ -3967,10 +3967,13 @@ class SeedDMS_Core_DMS {
foreach($resArr as $row) {
$expect = '';
switch($row['mimeType']) {
case "application/zip":
case "application/pdf":
case "image/png":
case "image/gif":
case "image/jpg":
case "audio/mp3":
case "text/rtf":
$expect = substr($row['mimeType'], -3, 3);
break;
}