mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 23:24:57 +00:00
initialize totalFolders earlier
This commit is contained in:
parent
452cf00c47
commit
0a1190f338
|
@ -604,10 +604,10 @@ class SeedDMS_Core_DMS {
|
|||
/* Do not search for folders if not at least a search for a key,
|
||||
* an owner, or creation date is requested.
|
||||
*/
|
||||
$totalFolders = 0;
|
||||
if($searchKey || $searchOwner || $searchCreateDate) {
|
||||
// Count the number of rows that the search will produce.
|
||||
$resArr = $this->db->getResultArray("SELECT COUNT(*) AS num ".$searchQuery);
|
||||
$totalFolders = 0;
|
||||
if ($resArr && isset($resArr[0]) && is_numeric($resArr[0]["num"]) && $resArr[0]["num"]>0) {
|
||||
$totalFolders = (integer)$resArr[0]["num"];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user