Needs review
Project:
modr8
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2009 at 13:42 UTC
Updated:
14 Jan 2011 at 14:57 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedInteresting question - I though the search results should respect the sql rewrite in terms of displaying results.
http://api.drupal.org/api/function/node_search/6
has:
So if that is not working, we need to figure out how to get the rewrite to be correct.
Comment #2
bryancasler commentedSubscribing
Comment #3
pwolanin commentedany more details about steps to reproduce?
Comment #4
lucascaro commentedHi all, I've ran into the same issue, moderated modules were showing in the search results. The search operation seemed to be running twice. The first time, $query was empty and modr8's hook_db_rewrite_sql was not modifying the results. As a quick fix, I've changed line 217 of modr8.module from:
if (!$access && $query) {
to
if (!$access) {
I just hope I'm not breaking functionality here.
here's a patch for whoever wants to give it a try.
P.S. I'm using v 6.x-1.3
Comment #5
lucascaro commentedHi again. As per http://www.lullabot.com/articles/hiding-content-drupals-search-system I think I'm not that wrong:
"Due to some curious code inside the node module, however, the query that's passed in is treated as empty. While that's a pretty big violation of Drupal's own coding standards, it makes it easy to intercept just the node search queries."
So that's basically how you rewrite search queries!