summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-06-30 20:23:33 +0000
committerDries Buytaert <dries@buytaert.net>2001-06-30 20:23:33 +0000
commit87575929a5a540b7085d3376fb34548cba130bdd (patch)
treefacd2c1d316c0f7d532e8ba983f5782f0befc87a /modules/system/system.module
parenteacfc0425d8e6905e048f3ab934e4baa00b0abb3 (diff)
downloadbrdo-87575929a5a540b7085d3376fb34548cba130bdd.tar.gz
brdo-87575929a5a540b7085d3376fb34548cba130bdd.tar.bz2
- Introduced caching support.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index b31a9dcad..1b459c87f 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -13,12 +13,12 @@ function system_help() {
}
function system_perm() {
- return array("administer site options");
+ return array("administer system settings");
}
function system_link($type) {
- if ($type == "admin" && user_access("administer site options")) {
- $links[] = "<a href=\"admin.php?mod=system\">configuration options</a>";
+ if ($type == "admin" && user_access("administer system settings")) {
+ $links[] = "<a href=\"admin.php?mod=system\">system settings</a>";
}
return $links ? $links : array();
@@ -36,6 +36,13 @@ function system_view_options() {
$output .= form_textfield(t("Anonymous user"), "anonymous", variable_get("anonymous", "Anonymous"), 30, 55, t("The name used to indicate anonymous users."));
$output .= "<HR>\n";
+ // caching:
+ $output .= "<H3>Cache settings</H3>\n";
+ $period = array(10 => format_interval(10), 20 => format_interval(20), 30 => format_interval(30), 40 => format_interval(40), 50 => format_interval(50), 50 => format_interval(50), 60 => format_interval(60), 90 => format_interval(90), 120 => format_interval(120), 150 => format_interval(150), 180 => format_interval(180), 210 => format_interval(210), 240 => format_interval(240), 270 => format_interval(270), 300 => format_interval(300), 360 => format_interval(360), 420 => format_interval(420), 480 => format_interval(480), 540 => format_interval(540), 600 => format_interval(600), 1800 => format_interval(1800), 3600 => format_interval(3600), 7200 => format_interval(7200));
+ $output .= form_select(t("Cache support"), "cache", variable_get("cache", 0), array("Disabled", "Enabled"), t("Enable or disable the caching of pages."));
+ $output .= form_select(t("Discard cached pages older than"), "cache_clear", variable_get("cache_clear", 30), $period, t("The time cached pages should be kept. Older pages are automatically refreshed."));
+ $output .= "<HR>\n";
+
// submission settings:
$output .= "<H3>Submission settings</H3>\n";
$size = array(1000 => "1.000 characters", 5000 => "5.000 characters", 10000 => "10.000 characters", 15000 => "15.000 characters", 30.000 => "30.000 characters", 50000 => "50.000 characters", 100000 => "100.000 characters");
@@ -122,7 +129,7 @@ function system_modules() {
function system_admin() {
global $edit, $op, $type;
- if (user_access("administer site options")) {
+ if (user_access("administer system settings")) {
print "<SMALL><A HREF=\"admin.php?mod=system&type=options\">site settings</A> | <A HREF=\"admin.php?mod=system&type=filter\">content filters</A> | <A HREF=\"admin.php?mod=system&op=modules\">modules</A> | <A HREF=\"admin.php?mod=system&op=help\">help</A></SMALL><HR>\n";