From 87575929a5a540b7085d3376fb34548cba130bdd Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 30 Jun 2001 20:23:33 +0000 Subject: - Introduced caching support. --- modules/system/system.module | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'modules/system') 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[] = "configuration options"; + if ($type == "admin" && user_access("administer system settings")) { + $links[] = "system settings"; } 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 .= "
\n"; + // caching: + $output .= "

Cache settings

\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 .= "
\n"; + // submission settings: $output .= "

Submission settings

\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 "site settings | content filters | modules | help
\n"; -- cgit v1.2.3