mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
hasDocuments() doesn't use internal cache anymore
This commit is contained in:
parent
3cf58fbc86
commit
8e302bc770
|
@ -825,10 +825,12 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
*/
|
||||
function hasDocuments() { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
/* Do not use the cache because it may not contain all documents if
|
||||
* the former call getDocuments() limited the number of documents
|
||||
if (isset($this->_documents)) {
|
||||
/** @noinspection PhpUndefinedFieldInspection */
|
||||
return count($this->_documents);
|
||||
}
|
||||
*/
|
||||
$queryStr = "SELECT count(*) as c FROM `tblDocuments` WHERE `folder` = " . $this->_id;
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && !$resArr)
|
||||
|
|
Loading…
Reference in New Issue
Block a user