Posted by gpk on June 11, 2009 at 10:06am
Jump to:
| Project: | Search Restrict |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi Robert,
This module looks a very quick and easy way of controlling search behaviour. :-)
One thought - since it is using http://api.drupal.org/api/function/hook_db_rewrite_sql/6, presumably this means that it will affect all node listings generated by core (or by contrib if they use db_rewrite_sql(), which I guess Views doesn't).
In practice I guess this won't be a problem, though in theory you might have a content admin you wanted to be able to see stuff listed at admin/content/node while not having the same stuff show up in search results.
Comments
#1
No, it only affects search queries.
#2
#3
Ah I get it, the clue is in function search_restrict_db_rewrite_sql() at http://drupalcode.org/viewvc/drupal/contributions/modules/search_restric...
if ($query == '' ...The only time hook_db_rewrite_sql() http://api.drupal.org/api/function/hook_db_rewrite_sql/6 is invoked with an empty $query is in http://api.drupal.org/api/function/node_search/6 case $op == 'search'. Handy!