From 06b38ad0f82809807567d8f523e634267dd6cf56 Mon Sep 17 00:00:00 2001 From: megan_w Date: Mon, 31 Mar 2008 10:58:21 +0000 Subject: [PATCH] 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. --- search2.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/search2.php b/search2.php index 42ad6da..356178f 100644 --- a/search2.php +++ b/search2.php @@ -99,7 +99,11 @@ class Search2Query extends PartialQuery function getFolderCount() { return 0; } function getDocumentCount() { - return count(unserialize($_SESSION['search2_results'])); + $results = $_SESSION['search2_results']; + if(isset($results) && !empty($results)){ + return count(unserialize($results)); + } + return 0; } function getFolders($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null) -- libgit2 0.21.4