Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
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
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
search_config.info
search_config.info
+2
-0
search_config.module
search_config.module
+2
-12
No files found.
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
Markdown
is supported
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