Commit 06b38ad0f82809807567d8f523e634267dd6cf56

Authored by megan_w
1 parent 35424153

KTS-3201

"Ability to toggle between old 'browse view' search results, and 'search engine' results view"
Fixed. Added check on whether search results exist, so the document count returns 0 not 1.

Committed by: Megan Watson
Reviewed by: Jonathan Byrne



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8326 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 5 additions and 1 deletions
search2.php
... ... @@ -99,7 +99,11 @@ class Search2Query extends PartialQuery
99 99 function getFolderCount() { return 0; }
100 100 function getDocumentCount()
101 101 {
102   - return count(unserialize($_SESSION['search2_results']));
  102 + $results = $_SESSION['search2_results'];
  103 + if(isset($results) && !empty($results)){
  104 + return count(unserialize($results));
  105 + }
  106 + return 0;
103 107 }
104 108  
105 109 function getFolders($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null)
... ...