mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
add method getFoldersMinMax()
This commit is contained in:
parent
5a587e5c85
commit
da8765fe33
|
@ -466,7 +466,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
$res = $db->getResult($queryStr);
|
||||
}
|
||||
|
||||
/* Update path in folderList for all documents */
|
||||
/* Update path in folderList for all folders */
|
||||
$queryStr = "SELECT `tblFolders`.`id`, `tblFolders`.`folderList` FROM `tblFolders` WHERE `folderList` LIKE '%:".$this->_id.":%'";
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
|
@ -2032,6 +2032,22 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
return $resArr[0];
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get the min and max sequence value for folders
|
||||
*
|
||||
* @return bool|array array with keys 'min' and 'max', false in case of an error
|
||||
*/
|
||||
function getFoldersMinMax() { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
$queryStr = "SELECT min(`sequence`) AS `min`, max(`sequence`) AS `max` FROM `tblFolders` WHERE `parent` = " . (int) $this->_id;
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
return false;
|
||||
|
||||
return $resArr[0];
|
||||
} /* }}} */
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user