Commit 54343ef7 authored by Nesta Campbell's avatar Nesta Campbell
Browse files

Removed option to disable entire advanced search form, this can now be

configured using the search module.
parent be0334fb
; $Id$
name = Search config
description = Configure the advanced search form
dependencies = search
......@@ -33,7 +33,7 @@
* don't really do much but allow the displaying of form fields per role.
*/
function search_config_perm() {
return array('use advanced search', 'search by node type', 'search by category', 'use keyword search');
return array('search by node type', 'search by category', 'use keyword search');
}
/**
......@@ -43,11 +43,7 @@ function search_config_form_alter($form_id, &$form) {
switch ($form_id) {
case 'search_form':
if (arg(1) == 'node') {
if (variable_get('search_config_disable_all', 0) || !user_access('use advanced search')) {
unset($form['advanced']);
return;
}
// Keywords
if (user_access('use keyword search')) {
if (variable_get('search_config_disable_or', 0)) {
......@@ -145,12 +141,6 @@ function search_config_search($op) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['search_config']['search_config_disable_all'] = array(
'#type' => 'checkbox',
'#title' => t('Disable \'Advanced search\' form'),
'#default_value' => variable_get('search_config_disable_all', 0)
);
// Keyword boxes:
$form['search_config']['keywords'] = array(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment