From 84aed0d9c30dacf764916f97f6954d9e9f9fc7c0 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 25 Feb 2010 02:40:26 +0000 Subject: [PATCH] BUGFIX Don't show search result items in MSSQLDatabase::searchEngine() that can't be viewed --- code/MSSQLDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index b0dca3a..90846eb 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -1230,7 +1230,7 @@ class MSSQLDatabase extends SS_Database { foreach($result as $row){ $row_result=DataObject::get_by_id($row['Source'], $row['ID']); - $searchResults->push($row_result); + if($row_result->canView()) $searchResults->push($row_result); } $searchResults->setPageLimits($start, $pageLength, $totalCount);