Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
search_config
Commits
54343ef7
Commit
54343ef7
authored
Feb 11, 2007
by
Nesta Campbell
Browse files
Removed option to disable entire advanced search form, this can now be
configured using the search module.
parent
be0334fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
search_config.info
View file @
54343ef7
; $Id$
name = Search config
description = Configure the advanced search form
dependencies = search
search_config.module
View file @
54343ef7
...
...
@@ -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
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment