mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
add new method SeedDMS_Core_Folder::getDocumentsMinMax()
This commit is contained in:
parent
fdadd6b043
commit
e5b215936a
|
@ -1692,6 +1692,22 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
return true;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get the min and max sequence value for documents
|
||||
*
|
||||
* @return boolean/array array with keys 'min' and 'max', false in case of an error
|
||||
*/
|
||||
function getDocumentsMinMax() { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
$queryStr = "SELECT min(`sequence`) AS `min`, max(`sequence`) AS `max` FROM `tblDocuments` WHERE `folder` = " . (int) $this->_id;
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
return false;
|
||||
|
||||
return $resArr[0];
|
||||
} /* }}} */
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
just version bump up
|
||||
add SeedDMS_Core_Folder::getDocumentsMinMax()
|
||||
</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="SeedDMS" name="/">
|
||||
|
|
Loading…
Reference in New Issue
Block a user