mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
39fc81b64b
|
@ -456,6 +456,26 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
return true;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Check if document has a given category
|
||||
*
|
||||
* @param SeedDMS_Core_DocumentCategory $cat
|
||||
* @return bool true if document has category, otherwise false
|
||||
*/
|
||||
function hasCategory($cat) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
if(!$cat)
|
||||
return false;
|
||||
|
||||
$queryStr = "SELECT * FROM `tblDocumentCategory` WHERE `documentID` = ".$this->_id." AND `categoryID`=".$cat->getId();
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (!$resArr)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Retrieve a list of all categories this document belongs to
|
||||
*
|
||||
|
|
|
@ -1906,6 +1906,7 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
|
|||
- add methods SeedDMS_Core_DocumentContent::getApproveLog() and SeedDMS_Core_DocumentContent::getReviewLog()
|
||||
- better handling of document with an empty workflow state
|
||||
- fix checking of email addresses by using filter_var instead of regex
|
||||
- add new method SeedDMS_Core_Document::hasCategory()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
|
|
Loading…
Reference in New Issue
Block a user