diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 47d2abe96..20885b04d 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -3163,10 +3163,27 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return true; } /* }}} */ + function setMimeType($newMimetype) { /* {{{ */ + $db = $this->_document->getDMS()->getDB(); + + $newMimetype = trim($newMimetype); + + if(!$newMimetype) + return false; + + $queryStr = "UPDATE `tblDocumentContent` SET `mimeType` = ".$db->qstr($newMimetype)." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; + if (!$db->getResult($queryStr)) + return false; + + $this->_mimeType = $newMimetype; + + return true; + } /* }}} */ + function setComment($newComment) { /* {{{ */ $db = $this->_document->getDMS()->getDB(); - $queryStr = "UPDATE `tblDocumentContent` SET `comment` = ".$db->qstr($newComment)." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; + $queryStr = "UPDATE `tblDocumentContent` SET `comment` = ".$db->qstr($newComment)." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; if (!$db->getResult($queryStr)) return false;