summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator/aggregator.module2
-rw-r--r--modules/forum/forum.module3
-rw-r--r--modules/locale/locale.module1
-rw-r--r--modules/search/search.module23
-rw-r--r--modules/system/system.install8
-rw-r--r--modules/taxonomy/taxonomy.module2
-rw-r--r--modules/user/user.module4
7 files changed, 24 insertions, 19 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index ca9b693fb..6648ff9bd 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -41,6 +41,7 @@ function aggregator_menu() {
'page arguments' => array('aggregator_form_feed'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/content/aggregator',
);
$items['admin/content/aggregator/add/category'] = array(
'title' => t('Add category'),
@@ -48,6 +49,7 @@ function aggregator_menu() {
'page arguments' => array('aggregator_form_category'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/content/aggregator',
);
$items['admin/content/aggregator/remove/%'] = array(
'title' => t('Remove items'),
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index b191bcc61..534adcf97 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -58,12 +58,14 @@ function forum_menu() {
'page callback' => 'forum_form_main',
'page arguments' => array('container'),
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/content/forum',
);
$items['admin/content/forum/add/forum'] = array(
'title' => t('Add forum'),
'page callback' => 'forum_form_main',
'page arguments' => array('forum'),
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/content/forum',
);
$items['admin/content/forum/settings'] = array(
'title' => t('Settings'),
@@ -71,6 +73,7 @@ function forum_menu() {
'page arguments' => array('forum_admin_settings'),
'weight' => 5,
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/content/forum',
);
$items['admin/content/forum/edit'] = array(
'page callback' => 'forum_form_main',
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index dd4c88093..71fd03902 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -61,6 +61,7 @@ function locale_menu() {
'page callback' => 'locale_string_search',
'weight' => 10,
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/settings/locale',
);
// Manage languages subtabs
diff --git a/modules/search/search.module b/modules/search/search.module
index 7e8d21d44..282aef95d 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -168,30 +168,19 @@ function search_menu() {
foreach (module_implements('search') as $name) {
$items['search/'. $name] = array(
+ 'title' => module_invoke($name, 'search', 'name', TRUE),
'page callback' => 'search_view',
'page arguments' => array($name),
- 'access callback' => FALSE,
- 'type' => MENU_LOCAL_TASK,
+ 'access callback' => '_search_menu',
+ 'access arguments' => array($name),
+ 'type' => $name == 'node' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
);
}
return $items;
}
-function search_init() {
- // To remember the user's search keywords when switching across tabs,
- // we dynamically add the keywords to the search tabs' paths.
- if (arg(0) == 'search') {
- $keys = search_get_keys();
- $keys = strlen($keys) ? '/'. $keys : '';
- foreach (module_implements('search') as $name) {
- $title = module_invoke($name, 'search', 'name');
- $item = menu_get_item('search/'. $name);
- $item->title = $title;
- $item->access = user_access('search content') && $title;
- menu_set_item('search/'. $name, $item);
- menu_set_item('search/'. $name . $keys, $item);
- }
- }
+function _search_menu($name) {
+ return user_access('search content') && module_invoke($name, 'search', 'name');
}
/**
diff --git a/modules/system/system.install b/modules/system/system.install
index bf65b3fea..30de39ba0 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -344,6 +344,10 @@ function system_install() {
parents varchar(255) NOT NULL default '',
depth int NOT NULL default '0',
has_children int NOT NULL default '0',
+ tab int NOT NULL default 0,
+ title varchar(255) NOT NULL default '',
+ default_tab int NOT NULL default '0',
+ parent varchar(255) NOT NULL default '',
PRIMARY KEY (path),
KEY vancode (vancode),
KEY fit (fit),
@@ -812,6 +816,10 @@ function system_install() {
parents varchar(255) NOT NULL default '',
depth int NOT NULL default '0',
has_children int NOT NULL default '0',
+ tab int NOT NULL default '0',
+ title varchar(255) NOT NULL default '',
+ default_tab int NOT NULL default '0',
+ parent varchar(255) NOT NULL default '',
PRIMARY KEY (path)
)");
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index ed05eb8bb..9eac0968e 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -88,6 +88,7 @@ function taxonomy_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_vocabulary'),
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/content/taxonomy',
);
$items['admin/content/taxonomy/edit/vocabulary/%'] = array(
@@ -136,6 +137,7 @@ function taxonomy_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_term', 3),
'type' => MENU_LOCAL_TASK,
+ 'parent' => 'admin/content/taxonomy/%',
);
return $items;
diff --git a/modules/user/user.module b/modules/user/user.module
index 3bab8cd3a..1da91f505 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -427,10 +427,10 @@ function user_file_download($file) {
/**
* Implementation of hook_search().
*/
-function user_search($op = 'search', $keys = NULL) {
+function user_search($op = 'search', $keys = NULL, $skip_access_check = FALSE) {
switch ($op) {
case 'name':
- if (user_access('access user profiles')) {
+ if ($skip_access_check || user_access('access user profiles')) {
return t('Users');
}
case 'search':