Closed (won't fix)
Project:
Core searches
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2007 at 20:47 UTC
Updated:
7 Jul 2008 at 11:22 UTC
Hi Robert,
Definitely a needed functionality, thanks for posting this. I was wrestling today with the same issue. I tried to see if it could be done without patching. Attached is the result.
Approach:
* Configuration options on search settings page to select whether to enable node, user searching
* Uses module weight to conditionally preempt search module's user and node search items. If disabled, we set a menu item with access FALSE.
* Alter the search box form to avoid forwarding to search/node if node searching is disabled.
I did only minimal testing.
This may leave some holes, as node and user will still respond to module_implements('search').
Thoughts?
| Comment | File | Size | Author |
|---|---|---|---|
| coresearches.patch | 3.62 KB | nedjo |
Comments
Comment #1
owen barton commentedThis is the exact same idea I had when reading the module description :)
I think this is a simpler approach than a patch, and is certainly a lot easier to use!
My original thought was to set the callback to '', which (IIRC) should effectively nuke the menu item out of existence, unlike setting access to FALSE which I think would give an access denied (rather than 404) if the URL was accessed directly. The two approaches are pretty equivalent though.
Comment #2
robertdouglass commentedPart of the goal is removing nearly 400 lines of code from core and not doing indexing for a search you don't intend to use. This module represents a clean solution, not just a cover-up of the problem. Hopefully I or someone will have enough energy in D7 to make this separation part of core.