function gss_check in Google Site Search 7
Check if Google Site Search can run.
Return value
bool Where or not GSS can run.
1 call to gss_check()
- gss_search_form_submit in ./
gss.module - Form submission handler for search forms.
File
- ./
gss.module, line 274 - GSS module file.
Code
function gss_check() {
$gss_global = variable_get('gss_global', FALSE);
if (!$gss_global) {
return FALSE;
}
$gss_api_key = variable_get('gss_api_key', FALSE);
if (!$gss_api_key) {
$search_active_modules = variable_get('search_active_modules', array(
'node',
'user',
));
// Disable Google Site Search if no Search engine unique ID is given.
unset($search_active_modules['gss']);
variable_set('search_active_modules', $search_active_modules);
return FALSE;
}
return TRUE;
}