Commit f818eaf6 authored by Dries's avatar Dries
Browse files

- Patch #47038 by DriesK: added a permission for advanced search.

parent 3c555515
......@@ -2126,7 +2126,7 @@ function node_form_alter($form_id, &$form) {
}
// Advanced node search form
elseif ($form_id == 'search_form' && arg(1) == 'node') {
elseif ($form_id == 'search_form' && arg(1) == 'node' && user_access('use advanced search')) {
// Keyword boxes:
$form['advanced'] = array(
'#type' => 'fieldset',
......
......@@ -2126,7 +2126,7 @@ function node_form_alter($form_id, &$form) {
}
// Advanced node search form
elseif ($form_id == 'search_form' && arg(1) == 'node') {
elseif ($form_id == 'search_form' && arg(1) == 'node' && user_access('use advanced search')) {
// Keyword boxes:
$form['advanced'] = array(
'#type' => 'fieldset',
......
......@@ -126,7 +126,7 @@ function search_help($section) {
* Implementation of hook_perm().
*/
function search_perm() {
return array('search content', 'administer search');
return array('search content', 'use advanced search', 'administer search');
}
/**
......
......@@ -126,7 +126,7 @@ function search_help($section) {
* Implementation of hook_perm().
*/
function search_perm() {
return array('search content', 'administer search');
return array('search content', 'use advanced search', 'administer search');
}
/**
......
Markdown is supported
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