mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +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;
|
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) { /* {{{ */
|
function setComment($newComment) { /* {{{ */
|
||||||
$db = $this->_document->getDMS()->getDB();
|
$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))
|
if (!$db->getResult($queryStr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user