mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +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;
|
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>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
just version bump up
|
add SeedDMS_Core_Folder::getDocumentsMinMax()
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir baseinstalldir="SeedDMS" name="/">
|
<dir baseinstalldir="SeedDMS" name="/">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user