summaryrefslogtreecommitdiff
path: root/modules/system.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-08-08 18:16:03 +0000
committerDries Buytaert <dries@buytaert.net>2002-08-08 18:16:03 +0000
commitc3e91ce8893e6b5bb65370cf2448ac2a876972c0 (patch)
treed7a5c1b859949873a523313039aa5d850c44eaa9 /modules/system.module
parent80aca19a616a051b2a062270886f57e9231b29e6 (diff)
downloadbrdo-c3e91ce8893e6b5bb65370cf2448ac2a876972c0.tar.gz
brdo-c3e91ce8893e6b5bb65370cf2448ac2a876972c0.tar.bz2
- 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).
Diffstat (limited to 'modules/system.module')
-rw-r--r--modules/system.module14
1 files changed, 3 insertions, 11 deletions
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 <b>node</b>).");
- $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 <b>eval()</b> after the page header but before the main page content.");
$output .= "<hr />\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 .= "<hr />\n";
- // comment settings:
- $output .= "<h3>Comment settings</h3>\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 .= "<hr />\n";
-
// layout settings:
$output .= "<h3>Layout settings</h3>\n";
foreach (theme_list() as $key => $value) $options .= "<option value=\"$key\"". (variable_get("theme_default", 0) == $key ? " selected=\"selected\"" : "") .">$key</option>\n";
@@ -182,9 +174,9 @@ function system_modules() {
$output .= "<td>$name</td>";
$output .= "<td>". check_output(module_invoke($name, "system", "description")) ."</td>";
$output .= "<td align=\"center\">". (in_array($name, $required) ? "required" : form_checkbox("", "status][$name", 1, $module["status"])) ."</td>";
- $output .= "<td>". (module_hook($name, "page") ? lm(t("view"), array("mod" => $name)) : "&nbsp;") ."</td>";
- $output .= "<td>". (module_hook($name, "admin") ? la(t("admin"), array("mod" => $name)) : "&nbsp;") ."</td>";
- // $output .= "<td>". (module_hook($name, "help") ? la(t("help"), array("mod" => $name, "op" => "help")) : "&nbsp;") ."</td>";
+ $output .= "<td>". (module_hook($name, "page") ? $module["status"] || in_array($name, $required) ? lm(t("view"), array("mod" => $name)) : t("view") : "&nbsp;") ."</td>";
+ $output .= "<td>". (module_hook($name, "admin") ? $module["status"] || in_array($name, $required) ? la(t("admin"), array("mod" => $name)) : t("admin") : "&nbsp;") ."</td>";
+// $output .= "<td>". (module_hook($name, "help") ? $module["status"] || in_array($name, $required) ? la(t("help"), array("mod" => $name, "op" => "help")) : t("help") : "&nbsp;") ."</td>";
$output .= "</tr>\n";
if (!in_array($name, $required)) {
db_query("INSERT INTO system SET name = '$name', type = 'module', filename = '$module[filename]', status = '$module[status]'");