浏览代码

search results, check for access

Signed-off-by: bachy <git@g-u-i.net>
bachy 12 年之前
父节点
当前提交
761ffba48d
共有 1 个文件被更改,包括 9 次插入0 次删除
  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(