diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-09-26 10:04:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-09-26 10:04:09 +0000 |
commit | f104d3cc12134fc574373d6a643d9c84a317de44 (patch) | |
tree | 838bcdb9cff17d43ec39a5ebdfd3274916839580 /modules/system | |
parent | 645d026e098a4dccef1bbbf0e40b9eecc8599daa (diff) | |
download | brdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.gz brdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.bz2 |
- Committed the admin menu integration patch. Thanks Adrian, Stefan and others.
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.module | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index 689b8ad8b..68259f334 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -52,33 +52,35 @@ function system_perm() { } function system_link($type) { - if ($type == "admin" && user_access("administer site configuration")) { - $help["general"] = t("General configuration options for your site. Set up the name of the site, e-mail address used in mail-outs, clean URL options, caching, etc."); - $help["themes"] = t("Select which themes are available to your users and specify the default theme."); - $help["modules"] = t("Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. On the left hand side click on the name of the module for their individual configurations. Once a module is enabled, you will need to grant permissions to users in user management."); - $help["filters"] = t("Filters fit between the raw text in a node and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions."); - - menu("admin/system", "site configuration", "system_admin", system_help("admin/system"), 3); - menu("admin/system/themes", "themes", "system_admin", system_help("admin/system/themes"), 2); - - foreach (theme_list(1) as $theme) { - // NOTE: refresh the list because some themes might have been enabled/disabled. - include_once "$theme->filename"; - $function = $theme->name ."_settings"; - if (function_exists($function)) { - menu("admin/system/themes/$theme->name", $theme->name, "system_admin"); + if ($type == "system") { + if (user_access("administer site configuration")) { + $help["general"] = t("General configuration options for your site. Set up the name of the site, e-mail address used in mail-outs, clean URL options, caching, etc."); + $help["themes"] = t("Select which themes are available to your users and specify the default theme."); + $help["modules"] = t("Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. On the left hand side click on the name of the module for their individual configurations. Once a module is enabled, you will need to grant permissions to users in user management."); + $help["filters"] = t("Filters fit between the raw text in a node and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions."); + + menu("admin/system", "site configuration", "system_admin", system_help("admin/system"), 3); + menu("admin/system/themes", "themes", "system_admin", system_help("admin/system/themes"), 2); + + foreach (theme_list(1) as $theme) { + // NOTE: refresh the list because some themes might have been enabled/disabled. + include_once "$theme->filename"; + $function = $theme->name ."_settings"; + if (function_exists($function)) { + menu("admin/system/themes/$theme->name", $theme->name, "system_admin"); + } } - } - menu("admin/system/modules", "modules", "system_admin", system_help("admin/system/modules"), 3); - foreach (module_list(1) as $name) { - // NOTE: refresh the list because some modules might have been enabled/disabled. - if (module_hook($name, "settings")) { - menu("admin/system/modules/$name", $name, "system_admin", module_invoke($name, "system", "admin_help")); + menu("admin/system/modules", "modules", "system_admin", system_help("admin/system/modules"), 3); + foreach (module_list(1) as $name) { + // NOTE: refresh the list because some modules might have been enabled/disabled. + if (module_hook($name, "settings")) { + menu("admin/system/modules/$name", $name, "system_admin", module_invoke($name, "system", "admin_help")); + } } + menu("admin/system/filters", "filters", "system_admin", system_help("admin/system/filters"), 4); + menu("admin/system/help", "help", "system_help", NULL, 9); } - menu("admin/system/filters", "filters", "system_admin", system_help("admin/system/filters"), 4); - menu("admin/system/help", "help", "system_help", NULL, 9); } } |