There is no straightforward way to disable the Search Amazon.com tab on the Search pages. See http://drupal.org/node/85137

The suggested generic solution at http://drupal.org/node/68792 is messy.

I can think of two ways to implement this:

1) Add in code for a setting to optionally disable the tab

2) Add in another permission, eg "Search Amazon.com" in the function amazon_perm(), and check for that permission when the tab is inserted (by changeing the 'access' => TRUE line in the following code in amazon.module)

 $items[] = array('path' => 'search/amazon',
                     'title' => ('Amazon.com'),
                     'access' => TRUE,
                     'type' => MENU_LOCAL_TASK,
                     'callback' => 'amazon_search_page');

This seems cleaner, is much simpler, and is what a number of other modules do before inserting menu tabs.

Please could you consider implementing it?

Thanks a lot.

Comments

Prometheus6’s picture

Assigned: Unassigned » Prometheus6
Category: bug » feature

I can do that. I'll add the new permission.

I'm in the middle of a major change for 5.x so it will be a couple of days,

Prometheus6’s picture

Status: Active » Fixed
Prometheus6’s picture

Status: Fixed » Closed (fixed)