The attached is the start of a patch which removes content types which the user isn't allowed to search for. However, it only works if the module is weighted higher than the node module. I see that this module is being set to -10, but the hook_db_rewrite_sql() still seems to work fine if I change the weight. Was there some other reason why it was being set lower?
If not, this patch will need an update hook to change the weight.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 535060_remove_advanced_search_form_types.patch | 1.67 KB | deviantintegral |
| remove_advanced_search_form_types.patch | 1.41 KB | deviantintegral |
Comments
Comment #1
robert castelo commentedWill tackle this one next week.
Comment #2
robert castelo commentedCan we use after-build to remove restricted content types from advanced search form?
Comment #3
deviantintegral commentedGood idea. Here's a patch which uses #after_build.
Comment #4
deviantintegral commentedUpdating to the latest version since there isn't a -dev release. The patch still applies cleanly to 1.1.
Comment #5
robert castelo commentedThanks deviantintegral, patch committed to Search Restrict 6.x-1.2
Comment #7
truyenle commenteddoesn't work in Drupal 7