From c3e91ce8893e6b5bb65370cf2448ac2a876972c0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 8 Aug 2002 18:16:03 +0000 Subject: - Patch by kika: "If a module is disabled on the "site configuration > modules" page, its operations (view, admin) should not be clickable (they should be present though, but as static text). --- modules/system.module | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'modules/system.module') diff --git a/modules/system.module b/modules/system.module index a7913a251..1e743aa7a 100644 --- a/modules/system.module +++ b/modules/system.module @@ -53,7 +53,6 @@ function system_view_options() { $output .= form_textfield("Anonymous user", "anonymous", variable_get("anonymous", "Anonymous"), 55, 55, "The name used to indicate anonymous users."); foreach (module_list() as $name) { if (module_hook($name, "page")) $pages[$name] = $name; } $output .= form_select("Default front page", "site_frontpage", variable_get("site_frontpage", "node"), $pages, "The home page displays content from this module (usually node)."); - $output .= form_textarea("Extra front page PHP", "site_frontpage_extra", variable_get("site_frontpage_extra", ""), 55, 5, "Insert arbitrary PHP into the home page. This PHP executes via eval() after the page header but before the main page content."); $output .= "
\n"; // caching: @@ -75,13 +74,6 @@ function system_view_options() { $output .= form_select("Date format", "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), "The format in which dates are displayed"); $output .= "
\n"; - // comment settings: - $output .= "

Comment settings

\n"; - $output .= form_select("Default display mode", "default_comment_mode", $conf["default_comment_mode"], $cmodes, "The default mode in which comments are displayed."); - $output .= form_select("Default display order", "default_comment_order", $conf["default_comment_order"], $corder, "The default order in which comments are displayed."); - for ($count = -1; $count < 6; $count++) $threshold[$count] = "Filter - $count"; - $output .= "
\n"; - // layout settings: $output .= "

Layout settings

\n"; foreach (theme_list() as $key => $value) $options .= "\n"; @@ -182,9 +174,9 @@ function system_modules() { $output .= "$name"; $output .= "". check_output(module_invoke($name, "system", "description")) .""; $output .= "". (in_array($name, $required) ? "required" : form_checkbox("", "status][$name", 1, $module["status"])) .""; - $output .= "". (module_hook($name, "page") ? lm(t("view"), array("mod" => $name)) : " ") .""; - $output .= "". (module_hook($name, "admin") ? la(t("admin"), array("mod" => $name)) : " ") .""; - // $output .= "". (module_hook($name, "help") ? la(t("help"), array("mod" => $name, "op" => "help")) : " ") .""; + $output .= "". (module_hook($name, "page") ? $module["status"] || in_array($name, $required) ? lm(t("view"), array("mod" => $name)) : t("view") : " ") .""; + $output .= "". (module_hook($name, "admin") ? $module["status"] || in_array($name, $required) ? la(t("admin"), array("mod" => $name)) : t("admin") : " ") .""; +// $output .= "". (module_hook($name, "help") ? $module["status"] || in_array($name, $required) ? la(t("help"), array("mod" => $name, "op" => "help")) : t("help") : " ") .""; $output .= "\n"; if (!in_array($name, $required)) { db_query("INSERT INTO system SET name = '$name', type = 'module', filename = '$module[filename]', status = '$module[status]'"); -- cgit v1.2.3