set number of folders found in search() to 0

This was set to late and in case the ѕearch for folders was not done
a php warning was issued
This commit is contained in:
Uwe Steinmann 2013-06-14 16:03:49 +02:00
parent c7d80e8dd4
commit a6972545fd

View File

@ -571,6 +571,7 @@ class SeedDMS_Core_DMS {
$searchin=array(1, 2, 3, 4);
/*--------- Do it all over again for folders -------------*/
$totalFolders = 0;
if($mode & 0x2) {
$searchKey = "";
$searchFields = array();
@ -650,7 +651,6 @@ 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);