mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
new method setMimeType()
This commit is contained in:
parent
fbf86b0fe6
commit
0163159c84
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user