function google_appliance_catch_all_task_access in Google Search Appliance 6.2
Menu access callback to prevent the catch-all LOCAL_TASK from triggering when one of the standard search tabs is active.
1 string reference to 'google_appliance_catch_all_task_access'
- google_appliance_menu in ./
google_appliance.module - Implementation of hook_menu().
File
- ./
google_appliance.module, line 277 - Google Search Appliance (GSA) / Google Mini integration
Code
function google_appliance_catch_all_task_access($permission, $client = NULL, $collection = NULL) {
if (!$client || !$collection) {
return FALSE;
}
$settings = google_appliance_get_settings();
foreach ($settings['tabs_array'] as $this_tab) {
$tab = _google_appliance_explode_tab($this_tab);
if ($tab['client'] == $client && $tab['collection'] == $collection) {
// We have another tab for this combination, so deny access.
return FALSE;
}
}
return user_access($permission);
}