Commit d5c80264 authored by Dries's avatar Dries

- Updated the calls to menu() to use MENU_HIDE instead of 1

parent 928c113b
......@@ -110,7 +110,7 @@ function import_link($type) {
menu("admin/node/syndication/news/help", t("help"), "import_help_page", 9);
}
if (user_access("access news feeds")) {
menu("import", t("news feeds"), "import_page", 0, 1);
menu("import", t("news feeds"), "import_page", 0, MENU_HIDE);
}
}
......
......@@ -110,7 +110,7 @@ function import_link($type) {
menu("admin/node/syndication/news/help", t("help"), "import_help_page", 9);
}
if (user_access("access news feeds")) {
menu("import", t("news feeds"), "import_page", 0, 1);
menu("import", t("news feeds"), "import_page", 0, MENU_HIDE);
}
}
......
......@@ -190,7 +190,7 @@ function archive_link($type) {
if ($type == "system") {
if (user_access("access content")) {
menu("archive", t("archives"), "archive_page", 0, 1);
menu("archive", t("archives"), "archive_page", 0, MENU_HIDE);
}
}
......
......@@ -190,7 +190,7 @@ function archive_link($type) {
if ($type == "system") {
if (user_access("access content")) {
menu("archive", t("archives"), "archive_page", 0, 1);
menu("archive", t("archives"), "archive_page", 0, MENU_HIDE);
}
}
......
......@@ -253,7 +253,7 @@ function blog_link($type, $node = 0, $main) {
menu("blog/" . $user->uid, t("my blog"), "blog_page", 1);
}
if (user_access("access content")) {
menu("blog", t("blogs"), "blog_page", 0, 1);
menu("blog", t("blogs"), "blog_page", 0, MENU_HIDE);
}
}
......
......@@ -253,7 +253,7 @@ function blog_link($type, $node = 0, $main) {
menu("blog/" . $user->uid, t("my blog"), "blog_page", 1);
}
if (user_access("access content")) {
menu("blog", t("blogs"), "blog_page", 0, 1);
menu("blog", t("blogs"), "blog_page", 0, MENU_HIDE);
}
}
......
......@@ -84,7 +84,7 @@ function book_link($type, $node = 0, $main = 0) {
}
}
if (user_access("access content")) {
menu("book", t("books"), "book_page", 0, 1);
menu("book", t("books"), "book_page", 0, MENU_HIDE);
}
}
......
......@@ -84,7 +84,7 @@ function book_link($type, $node = 0, $main = 0) {
}
}
if (user_access("access content")) {
menu("book", t("books"), "book_page", 0, 1);
menu("book", t("books"), "book_page", 0, MENU_HIDE);
}
}
......
......@@ -842,7 +842,7 @@ function comment_link($type, $node = 0, $main = 0) {
menu("admin/comment/comments/1", t("approval queue"), "comment_admin", 2);
menu("admin/comment/search", t("search"), "comment_admin", 8);
menu("admin/comment/help", t("help"), "comment_help_page", 9);
menu("admin/comment/edit", t("edit comment"), "comment_admin", 0, 1);
menu("admin/comment/edit", t("edit comment"), "comment_admin", 0, MENU_HIDE);
// comment settings:
if (user_access("administer moderation")) {
......@@ -853,7 +853,7 @@ function comment_link($type, $node = 0, $main = 0) {
menu("admin/comment/moderation/roles", t("initial scores"), "comment_admin", 6);
}
}
menu("comment", t("comments"), "comment_page", 0, 1);
menu("comment", t("comments"), "comment_page", 0, MENU_HIDE);
}
return $links;
......
......@@ -842,7 +842,7 @@ function comment_link($type, $node = 0, $main = 0) {
menu("admin/comment/comments/1", t("approval queue"), "comment_admin", 2);
menu("admin/comment/search", t("search"), "comment_admin", 8);
menu("admin/comment/help", t("help"), "comment_help_page", 9);
menu("admin/comment/edit", t("edit comment"), "comment_admin", 0, 1);
menu("admin/comment/edit", t("edit comment"), "comment_admin", 0, MENU_HIDE);
// comment settings:
if (user_access("administer moderation")) {
......@@ -853,7 +853,7 @@ function comment_link($type, $node = 0, $main = 0) {
menu("admin/comment/moderation/roles", t("initial scores"), "comment_admin", 6);
}
}
menu("comment", t("comments"), "comment_page", 0, 1);
menu("comment", t("comments"), "comment_page", 0, MENU_HIDE);
}
return $links;
......
......@@ -157,7 +157,7 @@ function drupal_auth($username, $password, $server) {
function drupal_link($type) {
if ($type == "system") {
menu("drupal", "Drupal", "drupal_page", 0, 1);
menu("drupal", "Drupal", "drupal_page", 0, MENU_HIDE);
}
}
......
......@@ -157,7 +157,7 @@ function drupal_auth($username, $password, $server) {
function drupal_link($type) {
if ($type == "system") {
menu("drupal", "Drupal", "drupal_page", 0, 1);
menu("drupal", "Drupal", "drupal_page", 0, MENU_HIDE);
}
}
......
......@@ -104,7 +104,7 @@ function forum_link($type, $node = 0, $main = 0) {
menu("node/add/forum", t("forum topic"), "node_page");
}
if (user_access("access content")) {
menu("forum", t("forums"), "forum_page", 0, 1);
menu("forum", t("forums"), "forum_page", 0, MENU_HIDE);
}
}
......
......@@ -104,7 +104,7 @@ function forum_link($type, $node = 0, $main = 0) {
menu("node/add/forum", t("forum topic"), "node_page");
}
if (user_access("access content")) {
menu("forum", t("forums"), "forum_page", 0, 1);
menu("forum", t("forums"), "forum_page", 0, MENU_HIDE);
}
}
......
......@@ -110,7 +110,7 @@ function import_link($type) {
menu("admin/node/syndication/news/help", t("help"), "import_help_page", 9);
}
if (user_access("access news feeds")) {
menu("import", t("news feeds"), "import_page", 0, 1);
menu("import", t("news feeds"), "import_page", 0, MENU_HIDE);
}
}
......
......@@ -71,8 +71,8 @@ function locale_link($type) {
menu("admin/locale", t("localization"), NULL, 5);
menu("admin/locale/search", t("search string"), "locale_admin", 8);
menu("admin/locale/help", t("help"), "locale_help_page", 9);
menu("admin/locale/edit", t("edit string"), "locale_admin", 0, 1); // hidden menu
menu("admin/locale/delete", t("delete string"), "locale_admin", 0, 1); // hidden menu
menu("admin/locale/edit", t("edit string"), "locale_admin", 0, MENU_HIDE);
menu("admin/locale/delete", t("delete string"), "locale_admin", 0, MENU_HIDE);
foreach ($languages as $key => $value) {
menu("admin/locale/$key", "$value", NULL);
......
......@@ -71,8 +71,8 @@ function locale_link($type) {
menu("admin/locale", t("localization"), NULL, 5);
menu("admin/locale/search", t("search string"), "locale_admin", 8);
menu("admin/locale/help", t("help"), "locale_help_page", 9);
menu("admin/locale/edit", t("edit string"), "locale_admin", 0, 1); // hidden menu
menu("admin/locale/delete", t("delete string"), "locale_admin", 0, 1); // hidden menu
menu("admin/locale/edit", t("edit string"), "locale_admin", 0, MENU_HIDE);
menu("admin/locale/delete", t("delete string"), "locale_admin", 0, MENU_HIDE);
foreach ($languages as $key => $value) {
menu("admin/locale/$key", "$value", NULL);
......
......@@ -581,12 +581,12 @@ function node_link($type, $node = 0, $main = 0) {
menu("admin/node", t("content"), "node_admin");
menu("admin/node/search", t("search"), "node_admin", 8);
menu("admin/node/help", t("help"), "node_help_page", 9);
menu("admin/node/edit", t("edit post"), "node_admin", 0, 1);
menu("admin/node/edit", t("edit post"), "node_admin", 0, MENU_HIDE);
menu("admin/node/settings", t("settings"), "node_admin", 8);
}
if (user_access("access content")) {
menu("node", t("content"), "node_page", 0, 1);
menu("node", t("content"), "node_page", 0, MENU_HIDE);
}
}
......
......@@ -581,12 +581,12 @@ function node_link($type, $node = 0, $main = 0) {
menu("admin/node", t("content"), "node_admin");
menu("admin/node/search", t("search"), "node_admin", 8);
menu("admin/node/help", t("help"), "node_help_page", 9);
menu("admin/node/edit", t("edit post"), "node_admin", 0, 1);
menu("admin/node/edit", t("edit post"), "node_admin", 0, MENU_HIDE);
menu("admin/node/settings", t("settings"), "node_admin", 8);
}
if (user_access("access content")) {
menu("node", t("content"), "node_page", 0, 1);
menu("node", t("content"), "node_page", 0, MENU_HIDE);
}
}
......
......@@ -185,7 +185,7 @@ function poll_link($type, $node = 0, $main) {
menu("node/add/poll", t("poll"), "node_page", 0);
}
if (user_access("access content")) {
menu("poll", t("polls"), "poll_page", 0, 1);
menu("poll", t("polls"), "poll_page", 0, MENU_HIDE);
}
}
else if ($type == "page" && user_access("access content")) {
......
......@@ -185,7 +185,7 @@ function poll_link($type, $node = 0, $main) {
menu("node/add/poll", t("poll"), "node_page", 0);
}
if (user_access("access content")) {
menu("poll", t("polls"), "poll_page", 0, 1);
menu("poll", t("polls"), "poll_page", 0, MENU_HIDE);
}
}
else if ($type == "page" && user_access("access content")) {
......
......@@ -43,7 +43,7 @@ function search_link($type) {
}
if ($type == "system" && user_access("search content")) {
menu("search", t("search"), "search_page", 0, 1);
menu("search", t("search"), "search_page", 0, MENU_HIDE);
}
return $links;
......
......@@ -43,7 +43,7 @@ function search_link($type) {
}
if ($type == "system" && user_access("search content")) {
menu("search", t("search"), "search_page", 0, 1);
menu("search", t("search"), "search_page", 0, MENU_HIDE);
}
return $links;
......
......@@ -78,14 +78,14 @@ function statistics_link($type, $node = 0, $main = 0) {
menu("admin/statistics/referrers/internal", t("internal referrers only"), "statistics_admin");
menu("admin/statistics/referrers/external", t("external referrers only"), "statistics_admin");
menu("admin/statistics/log", t("access log"), "statistics_admin");
menu("admin/statistics/log/node", t("track node"), "statistics_admin", 0, 1); //hidden
menu("admin/statistics/log/user", t("track user"), "statistics_admin", 0, 1); //hidden
menu("admin/statistics/log/host", t("track host"), "statistics_admin", 0, 1); //hidden
menu("admin/statistics/log/node", t("track node"), "statistics_admin", 0, MENU_HIDE);
menu("admin/statistics/log/user", t("track user"), "statistics_admin", 0, MENU_HIDE);
menu("admin/statistics/log/host", t("track host"), "statistics_admin", 0, MENU_HIDE);
menu("admin/statistics/help", t("help"), "statistics_help_page", 9);
}
if (user_access("access content")) {
menu("statistics", t("view most popular content"), "statistics_page", 0, 1);
menu("statistics", t("view most popular content"), "statistics_page", 0, MENU_HIDE);
}
}
......
......@@ -78,14 +78,14 @@ function statistics_link($type, $node = 0, $main = 0) {
menu("admin/statistics/referrers/internal", t("internal referrers only"), "statistics_admin");
menu("admin/statistics/referrers/external", t("external referrers only"), "statistics_admin");
menu("admin/statistics/log", t("access log"), "statistics_admin");
menu("admin/statistics/log/node", t("track node"), "statistics_admin", 0, 1); //hidden
menu("admin/statistics/log/user", t("track user"), "statistics_admin", 0, 1); //hidden
menu("admin/statistics/log/host", t("track host"), "statistics_admin", 0, 1); //hidden
menu("admin/statistics/log/node", t("track node"), "statistics_admin", 0, MENU_HIDE);
menu("admin/statistics/log/user", t("track user"), "statistics_admin", 0, MENU_HIDE);
menu("admin/statistics/log/host", t("track host"), "statistics_admin", 0, MENU_HIDE);
menu("admin/statistics/help", t("help"), "statistics_help_page", 9);
}
if (user_access("access content")) {
menu("statistics", t("view most popular content"), "statistics_page", 0, 1);
menu("statistics", t("view most popular content"), "statistics_page", 0, MENU_HIDE);
}
}
......
......@@ -29,7 +29,7 @@ function taxonomy_link($type, $node = NULL) {
menu("admin/taxonomy/help", t("help"), "taxonomy_admin", 9);
}
if (user_access("access content")) {
menu("taxonomy", t("taxonomy"), "taxonomy_page", 0, 1);
menu("taxonomy", t("taxonomy"), "taxonomy_page", 0, MENU_HIDE);
}
}
else if ($type == "taxonomy terms" && $node != NULL) {
......
......@@ -29,7 +29,7 @@ function taxonomy_link($type, $node = NULL) {
menu("admin/taxonomy/help", t("help"), "taxonomy_admin", 9);
}
if (user_access("access content")) {
menu("taxonomy", t("taxonomy"), "taxonomy_page", 0, 1);
menu("taxonomy", t("taxonomy"), "taxonomy_page", 0, MENU_HIDE);
}
}
else if ($type == "taxonomy terms" && $node != NULL) {
......
......@@ -16,7 +16,7 @@ function title_help($section) {
function title_link($type) {
if ($type == "system") {
if (user_access("access content")) {
menu("title", t("search"), "title_page", 0, 1);
menu("title", t("search"), "title_page", 0, MENU_HIDE);
}
}
}
......
......@@ -447,18 +447,16 @@ function theme_user_list($items, $title = NULL) {
}
function user_link($type) {
$links = array();
global $user;
if ($type == "system") {
global $user;
if ($user->uid) {
menu("user", t("my account"), "user_page", 8);
menu("user/edit", t("edit account"), "user_page", 0);
menu("user/logout", t("log out"), "user_page", 10);
}
else {
menu("user", t("my account"), "user_page", 8, 1);
menu("user", t("my account"), "user_page", 8, MENU_HIDE);
}
if (user_access("administer users")) {
......@@ -471,11 +469,9 @@ function user_link($type) {
menu("admin/user/permission", t("permissions"), "user_admin", 5);
menu("admin/user/search", t("search"), "user_admin", 8);
menu("admin/user/help", t("help"), "user_help_page", 9);
menu("admin/user/edit", t("edit user account"), "user_admin", 0, 1); // hidden menu
menu("admin/user/edit", t("edit user account"), "user_admin", 0, MENU_HIDE);
}
}
return $links;
}
/*** Authentication methods ************************************************/
......
......@@ -447,18 +447,16 @@ function theme_user_list($items, $title = NULL) {
}
function user_link($type) {
$links = array();
global $user;
if ($type == "system") {
global $user;
if ($user->uid) {
menu("user", t("my account"), "user_page", 8);
menu("user/edit", t("edit account"), "user_page", 0);
menu("user/logout", t("log out"), "user_page", 10);
}
else {
menu("user", t("my account"), "user_page", 8, 1);
menu("user", t("my account"), "user_page", 8, MENU_HIDE);
}
if (user_access("administer users")) {
......@@ -471,11 +469,9 @@ function user_link($type) {
menu("admin/user/permission", t("permissions"), "user_admin", 5);
menu("admin/user/search", t("search"), "user_admin", 8);
menu("admin/user/help", t("help"), "user_help_page", 9);
menu("admin/user/edit", t("edit user account"), "user_admin", 0, 1); // hidden menu
menu("admin/user/edit", t("edit user account"), "user_admin", 0, MENU_HIDE);
}
}
return $links;
}
/*** Authentication methods ************************************************/
......
......@@ -56,7 +56,7 @@ function watchdog_link($type) {
menu("admin/watchdog/warning", t("warning"), "watchdog_admin");
menu("admin/watchdog/error", t("error"), "watchdog_admin");
menu("admin/watchdog/httpd", t("httpd"), "watchdog_admin");
menu("admin/watchdog/view", t("view details"), "watchdog_admin", 0, 1); // hidden menu
menu("admin/watchdog/view", t("view details"), "watchdog_admin", 0, MENU_HIDE);
}
}
}
......
......@@ -56,7 +56,7 @@ function watchdog_link($type) {
menu("admin/watchdog/warning", t("warning"), "watchdog_admin");
menu("admin/watchdog/error", t("error"), "watchdog_admin");
menu("admin/watchdog/httpd", t("httpd"), "watchdog_admin");
menu("admin/watchdog/view", t("view details"), "watchdog_admin", 0, 1); // hidden menu
menu("admin/watchdog/view", t("view details"), "watchdog_admin", 0, MENU_HIDE);
}
}
}
......
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