Browse Source

search results, check for access

Signed-off-by: bachy <git@g-u-i.net>
bachy 12 years ago
parent
commit
761ffba48d
1 changed files with 9 additions and 0 deletions
  1. 9 0
      materio_search_api.pages.inc

+ 9 - 0
materio_search_api.pages.inc

@@ -190,6 +190,15 @@ function materio_search_api_results_search(){//, $limit = 20, $page = 0
 
     // dsm($results, 'results');
 
+    // $accessible_results = array();
+    // foreach ($results['results'] as $nid => $entity) {
+    //   if(node_access('view', node_load($nid)))
+    //     $accessible_results[$nid] = $entity;
+    // }
+    // $results['results'] = $accessible_results;
+    // $results['result count'] = count($accessible_results);
+
+
     # Load spellcheck.
     // if (isset($results['search_api_spellcheck'])) {
     //   $ret['results']['#spellcheck'] = array(